fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Jason Nadercompletions: update GNU wc optionsc5d6a5446

master
1.0 KiB21 linesraw
1if command -q wc && command wc --version >/dev/null 2>/dev/null
2    complete -c wc -s c -l bytes -d "Print byte count"
3    complete -c wc -s m -l chars -d "Print character count"
4    complete -c wc -s l -l lines -d "Print number of lines"
5    complete -c wc -s L -l max-line-length -d "Print length of longest line"
6    complete -c wc -s w -l words -d "Print number of words"
7    complete -c wc -l files0-from -d "Read input from NUL-terminated filenames in the given file" -r
8    complete -c wc -l help -d "Display help and exit"
9    complete -c wc -l version -d "Display version and exit"
10else
11    complete -c wc -s c -d "Print byte count"
12    complete -c wc -s m -d "Print character count"
13    complete -c wc -s l -d "Print number of lines"
14    complete -c wc -s w -d "Print number of words"
15    switch (uname -s)
16        case FreeBSD NetBSD
17            complete -c wc -s L -d "Print length of longest line"
18        case OpenBSD
19            complete -c wc -s h -d "Use B, KB, MB, GB, TB, PB, EB unit suffixes"
20    end
21end