Fix colorscheme completion that triggered a shell syntax error
When the user colors dir was missing, expr was failing, with the error ending up in the *debug* buffer
This commit is contained in:
parent
f6fae1b024
commit
79562a614e
|
@ -11,9 +11,13 @@ def -shell-params -docstring "colorscheme <name>: enable named colorscheme" \
|
||||||
(
|
(
|
||||||
localconfdir=${XDG_CONFIG_HOME:-${HOME}/.config}/kak
|
localconfdir=${XDG_CONFIG_HOME:-${HOME}/.config}/kak
|
||||||
for col in ${kak_runtime}/colors/*.kak ${localconfdir}/colors/*.kak; do
|
for col in ${kak_runtime}/colors/*.kak ${localconfdir}/colors/*.kak; do
|
||||||
expr $(basename "${col}" .kak) : "^\(${prefix}.*\)$"
|
candidate=$(basename "${col}" .kak)
|
||||||
|
case ${candidate} in
|
||||||
|
\**) ;;
|
||||||
|
${prefix}*) echo ${candidate} ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
) | sort -u | grep -v '^$'
|
) | sort -u
|
||||||
} \
|
} \
|
||||||
colorscheme %{ %sh{
|
colorscheme %{ %sh{
|
||||||
localconfdir=${XDG_CONFIG_HOME:-${HOME}/.config}/kak
|
localconfdir=${XDG_CONFIG_HOME:-${HOME}/.config}/kak
|
||||||
|
|
Loading…
Reference in New Issue
Block a user