mirror of
git://git.code.sf.net/p/zsh/code
synced 2026-01-02 08:21:09 +01:00
52768: Handle completer filenames with funny characters in them
For example, a file called _foo;bar will cause this to happen: % hello [press tab]zsh: command not found: _foo zsh: command not found: bar
This commit is contained in:
parent
017738cd60
commit
b727b74fe2
3 changed files with 10 additions and 5 deletions
|
|
@ -301,7 +301,7 @@ compdef() {
|
|||
if [[ -z "$eval" ]] && [[ "$1" = *\=* ]]; then
|
||||
while (( $# )); do
|
||||
if [[ "$1" = *\=* ]]; then
|
||||
cmd="${1%%\=*}"
|
||||
cmd="${(q)${1%%\=*}}"
|
||||
svc="${1#*\=}"
|
||||
func="$_comps[${_services[(r)$svc]:-$svc}]"
|
||||
[[ -n ${_services[$svc]} ]] &&
|
||||
|
|
@ -412,7 +412,7 @@ compdef() {
|
|||
svc=
|
||||
fi
|
||||
if [[ -z "$new" || -z "${_comps[$1]}" ]]; then
|
||||
_comps[$cmd]="$func"
|
||||
_comps[$cmd]="${(q)func}"
|
||||
[[ -n "$svc" ]] && _services[$cmd]="${1#*\=}"
|
||||
fi
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue