mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Correct wc completions for macOS, BSDs.
This commit is contained in:
parent
d99c19cc03
commit
eef62b8848
1 changed files with 20 additions and 7 deletions
|
@ -1,7 +1,20 @@
|
|||
complete -c wc -s c -l bytes -d "Print byte counts"
|
||||
complete -c wc -s m -l chars -d "Print character counts"
|
||||
complete -c wc -s l -l lines -d "Print newline counts"
|
||||
complete -c wc -s L -l max-line-length -d "Print length of longest line"
|
||||
complete -c wc -s w -l words -d "Print word counts"
|
||||
complete -c wc -l help -d "Display help and exit"
|
||||
complete -c wc -l version -d "Display version and exit"
|
||||
if command -q wc && command wc --version >/dev/null 2>/dev/null
|
||||
complete -c wc -s c -l bytes -d "Print byte count"
|
||||
complete -c wc -s m -l chars -d "Print character count"
|
||||
complete -c wc -s l -l lines -d "Print number of lines"
|
||||
complete -c wc -s L -l max-line-length -d "Print length of longest line"
|
||||
complete -c wc -s w -l words -d "Print number of words"
|
||||
complete -c wc -l help -d "Display help and exit"
|
||||
complete -c wc -l version -d "Display version and exit"
|
||||
else
|
||||
complete -c wc -s c -d "Print byte count"
|
||||
complete -c wc -s m -d "Print character count"
|
||||
complete -c wc -s l -d "Print number of lines"
|
||||
complete -c wc -s w -d "Print number of words"
|
||||
switch (uname -s)
|
||||
case FreeBSD NetBSD
|
||||
complete -c wc -s L -d "Print length of longest line"
|
||||
case OpenBSD
|
||||
complete -c wc -s h -d "Use B, KB, MB, GB, TB, PB, EB unit suffixes"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue