2018-04-01 20:42:38 +00:00
|
|
|
if head --version >/dev/null 2>/dev/null
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c head -s c -l bytes -d 'Print the first N bytes; Leading '-', truncate the last N bytes' -r
|
|
|
|
complete -c head -s n -l lines -d 'Print the first N lines; Leading '-', truncate the last N lines' -r
|
|
|
|
complete -c head -s q -l quiet -l silent -d 'Never print file names'
|
|
|
|
complete -c head -s v -l verbose -d 'Always print file names'
|
|
|
|
complete -f -c head -l version -d 'Display version'
|
|
|
|
complete -f -c head -l help -d 'Display help'
|
2015-11-19 20:32:21 +00:00
|
|
|
else # OSX and similar - no longopts (and fewer shortopts)
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c head -s c -d 'Print the first N bytes' -r
|
|
|
|
complete -c head -s n -d 'Print the first N lines' -r
|
2015-11-19 20:32:21 +00:00
|
|
|
end
|