2019-05-05 10:53:09 +00:00
|
|
|
if uniq --version >/dev/null 2>/dev/null
|
2019-11-25 11:03:25 +00:00
|
|
|
complete -c uniq -s c -l count -d "Print number of occurrences"
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c uniq -s d -l repeated -d "Only print duplicates"
|
|
|
|
complete -c uniq -s D -l all-repeated -d "Remove non-duplicate lines" -f -x -a "
|
2016-03-10 15:35:39 +00:00
|
|
|
none\t'Remove none-duplicate lines'
|
|
|
|
prepend\t'Remove non-duplicate lines and print an empty line before each non-duplicate'
|
|
|
|
separate\t'Remove non-duplicate lines and print an empty line between each non-duplicate'
|
|
|
|
"
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c uniq -s f -l skip-fields -d "Avoid comparing first N fields" -r
|
|
|
|
complete -c uniq -s i -l ignore-case -d "Case insensitive"
|
|
|
|
complete -c uniq -s s -l skip-chars -d "Avoid comparing first N characters" -r
|
|
|
|
complete -c uniq -s u -l unique -d "Only print unique lines"
|
|
|
|
complete -c uniq -s w -l check-chars -d "Compare only specified number of characters" -r
|
|
|
|
complete -c uniq -l help -d "Display help and exit"
|
|
|
|
complete -c uniq -l version -d "Display version and exit"
|
2017-10-11 17:07:45 +00:00
|
|
|
else # BSD
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c uniq -s c -d 'Precede each output line with count of its occurrence'
|
|
|
|
complete -c uniq -s d -d 'Only print duplicates'
|
|
|
|
complete -c uniq -s f -d 'Avoid comparing first N fields' -x
|
2022-02-15 08:34:25 +00:00
|
|
|
complete -c uniq -s s -d 'Avoid comparing first N characters' -x
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c uniq -s u -d 'Only print unique lines'
|
|
|
|
complete -c uniq -s i -d 'Case insensitive comparision'
|
2016-03-10 15:35:39 +00:00
|
|
|
end
|