diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-08 07:20:31 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-08 07:20:31 +0000 |
commit | 2e1c0ec48370313e483d6952cbc839658c1890df (patch) | |
tree | 527ff564bf01dbdf022eb104e5e53f427b6ad1d3 | |
parent | f3c138aee70011d0cd8b1314ae5154cf6474b7b3 (diff) | |
download | zsh-2e1c0ec48370313e483d6952cbc839658c1890df.tar.gz zsh-2e1c0ec48370313e483d6952cbc839658c1890df.tar.xz zsh-2e1c0ec48370313e483d6952cbc839658c1890df.zip |
make C-code expansion add a space only when more than one word was generated (11814)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index bc5b6b95c..ad76f67ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-06-08 Sven Wischnowsky <wischnow@zsh.org> + + * 11814: Src/Zle/zle_tricky.c: make C-code expansion add a space + only when more than one word was generated + 2000-06-08 Tanaka Akira <akr@zsh.org> * users/3130: Completion/Debian/_apt: fix actions for _alternative. diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index fcbe9404c..11f86ba92 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1627,7 +1627,7 @@ inststrlen(char *str, int move, int len) static int doexpansion(char *s, int lst, int olst, int explincmd) { - int ret = 1; + int ret = 1, first = 1; LinkList vl; char *ss; @@ -1678,10 +1678,11 @@ doexpansion(char *s, int lst, int olst, int explincmd) if (olst != COMP_EXPAND_COMPLETE || nonempty(vl) || (cs && line[cs-1] != '/')) { #endif - if (nonempty(vl)) { + if (nonempty(vl) || !first) { spaceinline(1); line[cs++] = ' '; } + first = 0; } end: popheap(); |