mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-17 21:31:35 +01:00
remove backslashes before $' in _expand when substitute' is unset; fix for clearing end-of-list lines in menu-selection (11110)
This commit is contained in:
parent
d981fc1316
commit
0d6350d65a
3 changed files with 15 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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[@]"
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue