summaryrefslogtreecommitdiffstats
path: root/shell-completion/tailf
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/tailf')
-rw-r--r--shell-completion/tailf24
1 files changed, 24 insertions, 0 deletions
diff --git a/shell-completion/tailf b/shell-completion/tailf
new file mode 100644
index 000000000..29c5bed0a
--- /dev/null
+++ b/shell-completion/tailf
@@ -0,0 +1,24 @@
+_tailf_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-n'|'--lines')
+ COMPREPLY=( $(compgen -W "number" -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS="-n --lines -number -V --version -h --help"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _tailf_module tailf