From: Oleg Broytman Date: Tue, 18 Oct 2016 19:29:09 +0000 (+0300) Subject: .shellrc: minor optimization in delegate_completion X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=a15463978ef0037c2d6a197f152cf185a7ec50a1 .shellrc: minor optimization in delegate_completion --- diff --git a/.shellrc b/.shellrc index 1302818..e21f720 100644 --- a/.shellrc +++ b/.shellrc @@ -119,10 +119,10 @@ if test -n "$BASH_VERSION"; then delegate_completion() { local prog completion_f programs prog="$1" - completion_f="$2" - shift; shift - programs="$@" if has_completion "$prog"; then + completion_f="$2" + shift; shift + programs="$@" eval "_${prog}_completion_loader() { _completion_loader $prog complete -F $completion_f $programs