aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-01-13 10:32:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-01-13 10:32:03 +0000
commit1e7c463fd951b1446f219b5ac54295496755b359 (patch)
tree67676610726fe5b696b16251d8c4e65227fcc6c7
parent5e7520de017418b78b168bf60f63ad874759dfdd (diff)
downloadzsh-1e7c463fd951b1446f219b5ac54295496755b359.tar.gz
zsh-1e7c463fd951b1446f219b5ac54295496755b359.tar.xz
zsh-1e7c463fd951b1446f219b5ac54295496755b359.zip
18059: allow compadd -r and -R with default space suffix
-rw-r--r--Doc/Zsh/compwid.yo4
-rw-r--r--Src/Zle/compresult.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo
index 298d0739c..4129a2eda 100644
--- a/Doc/Zsh/compwid.yo
+++ b/Doc/Zsh/compwid.yo
@@ -575,6 +575,10 @@ suffix if the next character typed inserts anything but a digit. One extra
backslash sequence is understood in this string: `tt(\-)' stands for
all characters that insert nothing. Thus `tt(-S "=" -q)' is the same
as `tt(-S "=" -r "= \t\n\-")'.
+
+This option may also be used without the tt(-S) option; then any
+automatically added space will be removed when one of the characters in the
+list is typed.
)
item(tt(-R) var(remove-func))(
This is another form of the tt(-r) option. When a suffix
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 326417139..218afc319 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1114,7 +1114,7 @@ do_single(Cmatch m)
inststrlen(" ", 1, 1);
minfo.insc++;
if (minfo.we)
- makesuffix(1);
+ makesuffixstr(m->remf, m->rems, 1);
}
}
if (minfo.we && partest && isset(AUTOPARAMKEYS))