Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit d130968

Browse files
committedDec 20, 2014
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.
1 parent 27ece46 commit d130968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎misc/zsh-completion

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ __get_tools() {
3232
}
3333

3434
__get_modes() {
35-
ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | head -n -1
35+
ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | sed '$d'
3636
}
3737

3838
__modes() {

0 commit comments

Comments
 (0)