summaryrefslogtreecommitdiff
path: root/system/zsh/fix-deprecated-egrep.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-04-06 03:33:12 +0000
committerZach van Rijn <me@zv.io>2023-04-06 03:33:55 +0000
commitbd152f905f4f6d4de2f4ee11809b38cf41e2d9ab (patch)
tree2bb19e54ce47ca5eddd99b043980736cc70d545f /system/zsh/fix-deprecated-egrep.patch
parent8437b3bbced0ace205d9745f838d7d4353641b63 (diff)
downloadpackages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.gz
packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.bz2
packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.xz
packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.zip
system/zsh: add patch for deprecated egrep usage. fixes #977.
Commit 5d9ffc28fc6a0d99338cac0b020e3eac486bccfc bumped grep from 3.7 to 3.10, and 3.8 introduced warnings for use of egrep/fgrep, which were deprecated in 2.5.3 from 2007. These warnings cause zsh test diffs to fail. Patch the tests to avoid deprecated behavior. See also: #976.
Diffstat (limited to 'system/zsh/fix-deprecated-egrep.patch')
-rw-r--r--system/zsh/fix-deprecated-egrep.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/system/zsh/fix-deprecated-egrep.patch b/system/zsh/fix-deprecated-egrep.patch
new file mode 100644
index 000000000..58d141002
--- /dev/null
+++ b/system/zsh/fix-deprecated-egrep.patch
@@ -0,0 +1,84 @@
+diff -ur a/StartupFiles/zshrc b/StartupFiles/zshrc
+--- a/StartupFiles/zshrc 2023-04-06 03:22:25.087384786 +0000
++++ b/StartupFiles/zshrc 2023-04-06 03:24:55.577428609 +0000
+@@ -29,7 +29,7 @@
+ alias po=popd
+ alias d='dirs -v'
+ alias h=history
+-alias grep=egrep
++alias grep='grep -E'
+ alias ll='ls -l'
+ alias la='ls -a'
+
+diff -ur a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
+--- a/Test/D07multibyte.ztst 2023-04-06 03:22:25.023387336 +0000
++++ b/Test/D07multibyte.ztst 2023-04-06 03:23:50.116009605 +0000
+@@ -6,7 +6,7 @@
+ unset -m LC_\*
+ mb_ok=
+ langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
+ for LANG in $langs; do
+ if [[ é = ? ]]; then
+ mb_ok=1
+diff -ur a/Test/E01options.ztst b/Test/E01options.ztst
+--- a/Test/E01options.ztst 2023-04-06 03:22:25.019387496 +0000
++++ b/Test/E01options.ztst 2023-04-06 03:22:45.338578392 +0000
+@@ -649,7 +649,7 @@
+ >noktarg1
+ >0 1
+
+- showopt() { setopt | egrep 'localoptions|ksharrays'; }
++ showopt() { setopt | grep -E 'localoptions|ksharrays'; }
+ f1() { setopt localoptions ksharrays; showopt }
+ f2() { setopt ksharrays; showopt }
+ setopt kshoptionprint
+diff -ur a/Test/V07pcre.ztst b/Test/V07pcre.ztst
+--- a/Test/V07pcre.ztst 2023-04-06 03:22:25.019387496 +0000
++++ b/Test/V07pcre.ztst 2023-04-06 03:24:15.802995141 +0000
+@@ -13,7 +13,7 @@
+ unset -m LC_\*
+ mb_ok=
+ langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
+ for LANG in $langs; do
+ if [[ é = ? ]]; then
+ mb_ok=1
+diff -ur a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
+--- a/Test/X02zlevi.ztst 2023-04-06 03:22:25.023387336 +0000
++++ b/Test/X02zlevi.ztst 2023-04-06 03:24:25.162626050 +0000
+@@ -4,7 +4,7 @@
+ unset -m LC_\*
+ ZSH_TEST_LANG=
+ langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
+ for LANG in $langs; do
+ if [[ é = ? ]]; then
+ ZSH_TEST_LANG=$LANG
+diff -ur a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst
+--- a/Test/X03zlebindkey.ztst 2023-04-06 03:22:25.015387655 +0000
++++ b/Test/X03zlebindkey.ztst 2023-04-06 03:24:02.531518995 +0000
+@@ -5,7 +5,7 @@
+ %prep
+ ZSH_TEST_LANG=
+ langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
+ for LANG in $langs; do
+ if [[ é = ? ]]; then
+ ZSH_TEST_LANG=$LANG
+diff -ur a/Test/Y01completion.ztst b/Test/Y01completion.ztst
+--- a/Test/Y01completion.ztst 2023-04-06 03:22:25.019387496 +0000
++++ b/Test/Y01completion.ztst 2023-04-06 03:23:35.392592114 +0000
+@@ -4,7 +4,7 @@
+ unset -m LC_\*
+ ZSH_TEST_LANG=
+ langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
+ for LANG in $langs; do
+ if [[ é = ? ]]; then
+ ZSH_TEST_LANG=$LANG