diff options
Diffstat (limited to 'ninja/misc/bash-completion')
-rw-r--r-- | ninja/misc/bash-completion | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ninja/misc/bash-completion b/ninja/misc/bash-completion index 0536760172b..e604cd438c0 100644 --- a/ninja/misc/bash-completion +++ b/ninja/misc/bash-completion @@ -49,9 +49,8 @@ _ninja_target() { C) eval dir="$OPTARG" ;; esac done; - targets_command="eval ninja -C \"${dir}\" -t targets all" - targets=$(${targets_command} 2>/dev/null | awk -F: '{print $1}') - COMPREPLY=($(compgen -W "$targets" -- "$cur")) + targets_command="eval ninja -C \"${dir}\" -t targets all 2>/dev/null | cut -d: -f1" + COMPREPLY=($(compgen -W '`${targets_command}`' -- "$cur")) fi return } |