Avoid stderr message from cut when completing colorschemes

This commit is contained in:
Maxime Coste 2016-04-11 21:12:36 +01:00
parent a2d426abba
commit 55d381999e

View File

@ -7,7 +7,7 @@ def -params 1.. runtime %{ %sh{
def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
-shell-completion %{ -shell-completion %{
prefix=$(printf %s "$1" | cut -c-${kak_pos_in_token}) prefix=$(printf %s "$1" | cut -c1-${kak_pos_in_token} 2> /dev/null)
( (
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