52946: Revert "Handle completer filenames with funny characters in them"

This reverts commit 88f47569030b12345aee3bd857e424351ee61726.
This commit is contained in:
Mikael Magnusson 2024-06-08 17:49:54 +02:00
parent 9dcaf78997
commit 9a79a60c90
3 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2024-06-08 Mikael Magnusson <mikachu@gmail.com>
* 52946: Completion/compdump, Completion/compinit: Revert 52768
2024-05-24 Bart Schaefer <schaefer@zsh.org> 2024-05-24 Bart Schaefer <schaefer@zsh.org>
* users/29882: Etc/FAQ.yo: Explain $RANDOM predictability * users/29882: Etc/FAQ.yo: Explain $RANDOM predictability

View file

@ -113,7 +113,7 @@ integer _i=5
print -n autoload -Uz >& $_d_fd print -n autoload -Uz >& $_d_fd
while (( $#_d_als )); do while (( $#_d_als )); do
if (( ! $+_compautos[$_d_als[1]] )); then if (( ! $+_compautos[$_d_als[1]] )); then
print -rn " ${(q-)_d_als[1]}" print -n " $_d_als[1]"
if (( ! --_i && $#_d_als > 1 )); then if (( ! --_i && $#_d_als > 1 )); then
_i=5 _i=5
print -n ' \\\n ' print -n ' \\\n '
@ -126,13 +126,13 @@ print >& $_d_fd
local _c local _c
for _c in "${(ok@)_compautos}"; do for _c in "${(ok@)_compautos}"; do
print -r "autoload -Uz ${(q-)_compautos[$_c]} $_c" >& $_d_fd print "autoload -Uz $_compautos[$_c] $_c" >& $_d_fd
done done
print >& $_d_fd print >& $_d_fd
print "typeset -gUa _comp_assocs" >& $_d_fd print "typeset -gUa _comp_assocs" >& $_d_fd
print -r "_comp_assocs=( ${(qq)_comp_assocs} )" >& $_d_fd print "_comp_assocs=( ${(qq)_comp_assocs} )" >& $_d_fd
exec {_d_fd}>&- exec {_d_fd}>&-
mv -f $_d_file ${_d_file%.$HOST.$$} mv -f $_d_file ${_d_file%.$HOST.$$}

View file

@ -301,7 +301,7 @@ compdef() {
if [[ -z "$eval" ]] && [[ "$1" = *\=* ]]; then if [[ -z "$eval" ]] && [[ "$1" = *\=* ]]; then
while (( $# )); do while (( $# )); do
if [[ "$1" = *\=* ]]; then if [[ "$1" = *\=* ]]; then
cmd="${(q)${1%%\=*}}" cmd="${1%%\=*}"
svc="${1#*\=}" svc="${1#*\=}"
func="$_comps[${_services[(r)$svc]:-$svc}]" func="$_comps[${_services[(r)$svc]:-$svc}]"
[[ -n ${_services[$svc]} ]] && [[ -n ${_services[$svc]} ]] &&
@ -412,7 +412,7 @@ compdef() {
svc= svc=
fi fi
if [[ -z "$new" || -z "${_comps[$1]}" ]]; then if [[ -z "$new" || -z "${_comps[$1]}" ]]; then
_comps[$cmd]="${(q)func}" _comps[$cmd]="$func"
[[ -n "$svc" ]] && _services[$cmd]="${1#*\=}" [[ -n "$svc" ]] && _services[$cmd]="${1#*\=}"
fi fi
;; ;;