diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-11-12 05:46:33 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-11-12 05:46:33 (GMT) |
commit | 207ff58e44294a8ce7df044b9b01f96799a972ac (patch) | |
tree | 9db2c2e27941c2cc210081ee8c3e13894c09cfce /misc | |
parent | dda86b75405a0eba1622af20da907daf96381698 (diff) | |
parent | fc135c456d1ba2a39dfb5efe5004102168bef856 (diff) | |
download | Ninja-207ff58e44294a8ce7df044b9b01f96799a972ac.zip Ninja-207ff58e44294a8ce7df044b9b01f96799a972ac.tar.gz Ninja-207ff58e44294a8ce7df044b9b01f96799a972ac.tar.bz2 |
Merge pull request #1047 from pykello/master
Speed-up bash target auto-complete.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bash-completion | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/misc/bash-completion b/misc/bash-completion index 0536760..e604cd4 100644 --- a/misc/bash-completion +++ b/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 } |