summaryrefslogtreecommitdiff
path: root/misc/zsh-completion
diff options
context:
space:
mode:
authorFraser Cormack <frasercrmck@gmail.com>2014-12-20 00:12:52 +0000
committerFraser Cormack <frasercrmck@gmail.com>2014-12-20 00:12:52 +0000
commitd130968ecd5224fd86ce356086adf47bfe0b40ee (patch)
tree4871adac2a8895531c017e4bc62d92ec1d58e750 /misc/zsh-completion
parent27ece4668cc906f48866b9723c26477991adabd9 (diff)
downloadninja-d130968ecd5224fd86ce356086adf47bfe0b40ee.tar.gz
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/zsh-completion')
-rw-r--r--misc/zsh-completion2
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() {