D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
bash-completion
/
completions
/
Filename :
rust-tail.bash
back
Copy
_tail() { local i cur prev opts cmd COMPREPLY=() if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then cur="$2" else cur="${COMP_WORDS[COMP_CWORD]}" fi prev="$3" cmd="" opts="" for i in "${COMP_WORDS[@]:0:COMP_CWORD}" do case "${cmd},${i}" in ",$1") cmd="tail" ;; *) ;; esac done case "${cmd}" in tail) opts="-c -f -n -q -s -v -z -F -h -V --bytes --follow --lines --pid --silent --quiet --sleep-interval --max-unchanged-stats --verbose --zero-terminated --use-polling --retry --debug --presume-input-pipe --help --version [files]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --bytes) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --follow) COMPREPLY=($(compgen -W "descriptor name" -- "${cur}")) return 0 ;; -f) COMPREPLY=($(compgen -W "descriptor name" -- "${cur}")) return 0 ;; --lines) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -n) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --pid) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --sleep-interval) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -s) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --max-unchanged-stats) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; esac } if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then complete -F _tail -o nosort -o bashdefault -o default tail else complete -F _tail -o bashdefault -o default tail fi