D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
bash-completion
/
completions
/
Filename :
rust-split.bash
back
Copy
_split() { 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="split" ;; *) ;; esac done case "${cmd}" in split) opts="-b -C -l -n -e -d -x -a -t -h -V --bytes --line-bytes --lines --number --additional-suffix --filter --elide-empty-files --numeric-suffixes --hex-suffixes --suffix-length --verbose --separator --io-blksize --help --version [input] [prefix]" 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 ;; -b) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --line-bytes) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -C) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --lines) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -l) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --number) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -n) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --additional-suffix) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --filter) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --numeric-suffixes) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --hex-suffixes) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --suffix-length) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -a) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --separator) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -t) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --io-blksize) 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 _split -o nosort -o bashdefault -o default split else complete -F _split -o bashdefault -o default split fi