diff options
author | Fraser Cormack <frasercrmck@gmail.com> | 2014-12-20 00:12:52 (GMT) |
---|---|---|
committer | Fraser Cormack <frasercrmck@gmail.com> | 2014-12-20 00:12:52 (GMT) |
commit | d130968ecd5224fd86ce356086adf47bfe0b40ee (patch) | |
tree | 4871adac2a8895531c017e4bc62d92ec1d58e750 /misc | |
parent | 27ece4668cc906f48866b9723c26477991adabd9 (diff) | |
download | Ninja-d130968ecd5224fd86ce356086adf47bfe0b40ee.zip Ninja-d130968ecd5224fd86ce356086adf47bfe0b40ee.tar.gz Ninja-d130968ecd5224fd86ce356086adf47bfe0b40ee.tar.bz2 |
zsh-completion: remove use of 'head' with negative offset
Some systems - like OSX - don't come with a version of head that
supports a negative value for the -n flag. Such systems get a message
such as this when tab-completing ninja's -d flag:
ninja -dhead: illegal line count -- -1
Using sed instead should be more universally supported.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/zsh-completion | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/zsh-completion b/misc/zsh-completion index af24f89..fd9b3a7 100644 --- a/misc/zsh-completion +++ b/misc/zsh-completion @@ -32,7 +32,7 @@ __get_tools() { } __get_modes() { - ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | head -n -1 + ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | sed '$d' } __modes() { |