1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-04 20:40:57 +02:00
zsh/Completion/Core/_setup
1999-12-07 09:41:29 +00:00

51 lines
1.1 KiB
Text

#autoload
local val
if _style -a "$1" list-colors val; then
if [[ "$1" = default ]]; then
ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
else
eval "ZLS_COLORS=\"(${1})\${(j.:(${1}).)\${(@)val:gs/:/\\\:}}:\${ZLS_COLORS}\""
fi
fi
if _style -s "$1" list-packed val; then
if [[ "$val" = (yes|true|1|on) ]]; then
compstate[list]="${compstate[list]} packed"
else
compstate[list]="${compstate[list]:gs/packed//}"
fi
else
compstate[list]="$_saved_list"
fi
if _style -s "$1" list-rows-first val; then
if [[ "$val" = (yes|true|1|on) ]]; then
compstate[list]="${compstate[list]} rows"
else
compstate[list]="${compstate[list]:gs/rows//}"
fi
else
compstate[list]="$_saved_list"
fi
if _style -s "$1" last-prompt val; then
if [[ "$val" = (yes|true|1|on) ]]; then
compstate[last_prompt]=yes
else
compstate[last_prompt]=''
fi
else
compstate[last_prompt]="$_saved_lastprompt"
fi
if _style -s "$1" accept-exact val; then
if [[ "$val" = (yes|true|1|on) ]]; then
compstate[exact]=accept
else
compstate[exact]=''
fi
else
compstate[exact]="$_saved_exact"
fi