summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-06-22 13:10:22 +0100
committerPeter Stephenson <pws@zsh.org>2016-06-22 13:10:22 +0100
commit954cdd77d77136e572fc4896f3c0ba16f5c933ec (patch)
tree43fcd3fdb0a8f94b4bad0d35d8b64a3571c0d3a7 /Test
parente83489fc4ba168abeb5ea7e23e64383fed181ed3 (diff)
downloadzsh-954cdd77d77136e572fc4896f3c0ba16f5c933ec.tar.gz
zsh-954cdd77d77136e572fc4896f3c0ba16f5c933ec.tar.xz
zsh-954cdd77d77136e572fc4896f3c0ba16f5c933ec.zip
38746: Fix suffix alias expansion recursion.
This was problematic if the expansion landed you back in
command position.

Delay marking the alias as out of use until the text that
caused the expansion is finished.
Diffstat (limited to 'Test')
-rw-r--r--Test/A02alias.ztst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Test/A02alias.ztst b/Test/A02alias.ztst
index 49e47567c..1e09cd3f1 100644
--- a/Test/A02alias.ztst
+++ b/Test/A02alias.ztst
@@ -104,3 +104,9 @@
 >0
 ?(eval):2: invalid alias 'x=y' encountered while printing aliases
 # Currently, 'alias -L' returns 0 in this case.  Perhaps it should return 1.
+
+  alias -s mysuff='print -r "You said it.";'
+  eval 'thingummy.mysuff'
+127:No endless loop with suffix alias in command position
+>You said it.
+?(eval):1: command not found: thingummy.mysuff