2019-05-05 10:53:09 +00:00
|
|
|
if tail --version >/dev/null 2>/dev/null
|
2024-05-16 16:49:52 +00:00
|
|
|
complete -c tail -s c -l bytes -x -d 'output the last K bytes; with +K output bytes starting with the Kth'
|
2024-05-16 15:04:07 +00:00
|
|
|
complete -c tail -s f -l follow -a 'name descriptor' -d 'output appended data as the file grows'
|
2015-11-19 20:32:21 +00:00
|
|
|
complete -c tail -s F -d 'same as --follow=name --retry'
|
2024-05-16 16:49:52 +00:00
|
|
|
complete -c tail -s n -l lines -x -d 'output the last K lines; with +K output lines starting with the Kth'
|
2015-11-19 20:32:21 +00:00
|
|
|
complete -c tail -l max-unchanged-stats -x -d 'with --follow=name, reopen a FILE which has not changed size after N iterations'
|
|
|
|
complete -c tail -l pid -d 'with -f, terminate after process ID, PID dies' -xa '(__fish_complete_pids)'
|
|
|
|
complete -c tail -s q -l quiet -l silent -d 'never output headers giving file names'
|
2024-05-16 15:04:07 +00:00
|
|
|
complete -c tail -l retry -d 'keep trying to open a file even when it is inaccessible; useful with --follow=name'
|
2015-11-19 20:32:21 +00:00
|
|
|
complete -c tail -s s -l sleep-interval -x -d 'with -f, sleep for approximately N seconds (default 1.0) between iterations'
|
|
|
|
complete -c tail -s v -l verbose -d 'always output headers giving file names'
|
2017-07-22 12:09:07 +00:00
|
|
|
complete -c tail -x -l help -d 'display this help and exit'
|
|
|
|
complete -c tail -x -l version -d 'output version information and exit'
|
2015-11-19 20:32:21 +00:00
|
|
|
else # OSX and similar - no longopts (and fewer shortopts)
|
2015-12-10 14:20:46 +00:00
|
|
|
complete -c tail -s b -x -d 'output last K 512 byte blocks'
|
2015-11-19 20:32:21 +00:00
|
|
|
complete -c tail -s c -x -d 'output the last K bytes or only K bytes with -r'
|
|
|
|
complete -c tail -s f -d 'output appended data as the file grows'
|
|
|
|
complete -c tail -s F -d 'Like -f, but also follow renamed or rotated files'
|
|
|
|
complete -c tail -s n -x -d 'output the last K lines, instead of the last 10 - or only K lines with -r'
|
|
|
|
complete -c tail -s q -d 'never output headers giving file names'
|
2019-05-05 10:53:09 +00:00
|
|
|
complete -c tail -s r -d 'Display input in reverse order' # Only in OSX
|
2015-11-19 20:32:21 +00:00
|
|
|
end
|