diff options
author | Bart Schaefer <schaefer@zsh.org> | 2023-08-27 15:22:14 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2023-08-27 15:22:14 -0700 |
commit | 2a854aae481e7eb064729db28a71ed0efb2f33e6 (patch) | |
tree | e14cf07882b51c5416944eb49f847524046e6d79 /Doc/Zsh/contrib.yo | |
parent | 97b4a30c4e5f4837bac7c5c67bd583d3aeaf7886 (diff) | |
download | zsh-2a854aae481e7eb064729db28a71ed0efb2f33e6.tar.gz zsh-2a854aae481e7eb064729db28a71ed0efb2f33e6.tar.xz zsh-2a854aae481e7eb064729db28a71ed0efb2f33e6.zip |
52028: improvements to _shadow / _unshadow, plus helper and doc
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r-- | Doc/Zsh/contrib.yo | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 96de5aa9b..ef11d77ad 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -4336,6 +4336,27 @@ example(is-at-least 3.1.6-15 && setopt NO_GLOBAL_RCS is-at-least 3.1.0 && setopt HIST_REDUCE_BLANKS is-at-least 2.6-17 || print "You can't use is-at-least here.") ) +findex(mkshadow) +findex(rmshadow) +xitem(tt(mkshadow) [ tt(-s) var(suffix) ] [ -- ] var(command_name) ...) +item(tt(rmshadow))( +These functions are an interface to the tt(_shadow) and tt(_unshadow) +completion utilities to make them more easily accessible in other +contexts. Usage is exactly as for the completion utility: +example({ + mkshadow fname + function fname { + # Do your new thing + } + # Invoke callers of fname +} always { + rmshadow +}) + +Upon return, the value of tt($REPLY) is the suffix used to create a +copy of the original var(command_name), so var(command_name)tt(@$REPLY) +invokes that original. +) findex(nslookup) item(tt(nslookup) [ var(arg) ... ])( This wrapper function for the tt(nslookup) command requires the |