about summary refs log tree commit diff
path: root/Etc
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-02-04 17:01:07 -0800
committerBart Schaefer <schaefer@ipost.com>2021-02-04 17:01:07 -0800
commit6db45b94d8ed7c8878e32f8b5ca47b6aa84c4cb2 (patch)
tree3dd8ee02a3a357ac5e45f9266f0d3eee75d38764 /Etc
parent9120d1e841b0813f1c71d55f77c3d18fc8318187 (diff)
downloadzsh-6db45b94d8ed7c8878e32f8b5ca47b6aa84c4cb2.tar.gz
zsh-6db45b94d8ed7c8878e32f8b5ca47b6aa84c4cb2.tar.xz
zsh-6db45b94d8ed7c8878e32f8b5ca47b6aa84c4cb2.zip
47889: Update csh aliasing equivalences
Diffstat (limited to 'Etc')
-rw-r--r--Etc/FAQ.yo10
1 files changed, 5 insertions, 5 deletions
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index a4ffba688..7aeddd89c 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -715,7 +715,8 @@ label(23)
   enumeration(
   myeit() If the csh alias references "parameters" (tt(\!:1), tt(\!*) etc.),
      then in zsh you need a function (referencing tt($1), tt($*) etc.).
-     Otherwise, you can use a zsh alias.
+     In recent versions of zsh this can be done by defining an anonymous
+     function within the alias.  Otherwise, a simple zsh alias suffices.
 
   myeit() If you use a zsh function, you need to refer _at_least_ to
      tt($*) in the body (inside the tt({ })).  Parameters don't magically
@@ -759,7 +760,7 @@ label(23)
      parameters. (E.g., in a csh alias, a reference to tt(\!:5) will
      cause an error if 4 or fewer arguments are given; in a zsh
      function, tt($5) is the empty string if there are 4 or fewer
-     parameters.)
+     parameters.  Force an error in this example by using tt(${5?}).)
 
   myeit() To begin a zsh alias with a - (dash, hyphen) character, use
      mytt(alias --):
@@ -780,9 +781,8 @@ label(23)
   )
   mytt(l) in the function definition is in command position and is expanded
   as an alias, defining mytt(/bin/ls) and mytt(-F) as functions which call
-  mytt(/bin/ls), which gets a bit recursive.  This can be avoided if you use
-  mytt(function) to define a function, which doesn't expand aliases.  It is
-  possible to argue for extra warnings somewhere in this mess.
+  mytt(/bin/ls), which gets a bit recursive.  Recent versions of zsh treat
+  this as an error, but older versions silently create the functions.
 
   One workaround for this is to use the "function" keyword instead:
   verb(