diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Core/_expand | 13 | ||||
-rw-r--r-- | Src/Zle/complist.c | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog index 16982fbb1..cebe082f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-05-03 Sven Wischnowsky <wischnow@informatik.hu-berlin.de> + + * 11110: Completion/Core/_expand, Src/Zle/complist.c: remove + backslashes before `$' in _expand when `substitute' is unset; fix + for clearing end-of-list lines in menu-selection + 2000-05-03 Tanaka Akira <akr@m17n.org> * 11109: Completion/X/_xauth: new completion for xauth. diff --git a/Completion/Core/_expand b/Completion/Core/_expand index 712052b16..f75c626d3 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -35,11 +35,14 @@ exp=("$word") # changes quoted spaces, tabs, and newlines into spaces and protects # this function from aborting on parse errors in the expansion. -{ zstyle -s ":completion:${curcontext}:" substitute expr || - { [[ "$curcontext" = expand-word:* ]] && expr=1 } } && - [[ "${(e):-\$[$expr]}" -eq 1 ]] && - exp=( ${(f)"$(print -lR - ${(e)exp//\\[ +if { zstyle -s ":completion:${curcontext}:" substitute expr || + { [[ "$curcontext" = expand-word:* ]] && expr=1 } } && + [[ "${(e):-\$[$expr]}" -eq 1 ]]; then + exp=( ${(f)"$(print -lR - ${(e)exp//\\[ ]/ })"} ) 2>/dev/null +else + exp=( "${exp:s/\\\$/\$}" ) +fi # If the array is empty, store the original string again. @@ -117,7 +120,7 @@ else if [[ -d "$i" && "$i" != */ ]]; then dir=( "$dir[@]" "$i" ) else - normal=( "$dir[@]" "$i" ) + normal=( "$normal[@]" "$i" ) fi done (( $#dir )) && compadd "$expl[@]" -UQ -qS/ - "$dir[@]" diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 527cd9825..f6a871f0f 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -985,7 +985,7 @@ compprintlist(int showall) lastml = 0; } cl = (listdat.nlines > lines - nlnct - mhasstat ? - lines - nlnct - mhasstat : listdat.nlines); + lines - nlnct - mhasstat : listdat.nlines) - 1; mrestlines = lines - 1; if (cl < 2) { |