Server IP : 85.214.239.14 / Your IP : 3.143.7.53 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/task/2/root/proc/2/cwd/usr/share/bash-completion/completions/ |
Upload File : |
# tshark(1) completion -*- shell-script -*- _tshark() { local cur prev words cword prefix _init_completion -n : || return case $cur in -o*) prefix=-o ;; -X*) prefix=-X ;; esac case ${prefix:-$prev} in --*) # Fallback to completion of long options below. ;; -o*) if [[ $cur == *:* ]]; then cur=${cur#*:} _filedir else [[ -v _tshark_prefs ]] || _tshark_prefs="$("$1" -G defaultprefs 2>/dev/null | command sed -ne 's/^#\{0,1\}\([a-z0-9_.-]\{1,\}:\).*/\1/p' | tr '\n' ' ')" : ${prefix:=} COMPREPLY=($(compgen -P "$prefix" -W "$_tshark_prefs" \ -- "${cur:${#prefix}}")) [[ ${COMPREPLY-} == *: ]] && compopt -o nospace fi return ;; -*[fsBDLcRNdCeEzhvoK]) return ;; -*i) COMPREPLY=($(compgen -W \ "$("$1" -D 2>/dev/null | awk '{print $2}')" -- "$cur")) return ;; -*y) local opts i for ((i = ${#words[@]} - 1; i > 0; i--)); do if [[ ${words[i]} == -i ]]; then opts+="-i ${words[i + 1]}" break fi done COMPREPLY=($(compgen -W "$("$1" $opts -L 2>/dev/null | awk '/^ / { print $1 }')" -- "$cur")) return ;; -*[ab]) COMPREPLY=($(compgen -W 'duration: filesize: files:' -- "$cur")) [[ ${COMPREPLY-} == *: ]] && compopt -o nospace return ;; -*[rH]) # -r accepts a lot of different file types _filedir return ;; -*w) _filedir [[ $cur == @(|-) ]] && COMPREPLY+=(-) return ;; -*F) COMPREPLY=($(compgen -W "$("$1" -F 2>&1 | awk '/^ / { print $1 }')" -- "$cur")) return ;; -*O) local prefix= [[ $cur == *,* ]] && prefix="${cur%,*}," [[ -v _tshark_protocols ]] || _tshark_protocols="$("$1" -G protocols 2>/dev/null | cut -f 3 | tr '\n' ' ')" COMPREPLY=($(compgen -W "$_tshark_protocols" -- "${cur##*,}")) ((${#COMPREPLY[@]} == 1)) && COMPREPLY=(${COMPREPLY/#/$prefix}) return ;; -*T) # Parse from: tshark -T . 2>&1 | awk -F \" '/^\t*"/ { print $2 }' COMPREPLY=($(compgen -W \ 'pdml ps psml json jsonraw ek tabs text fields' -- "$cur")) return ;; -*t) # Parse from: tshark -t . 2>&1 | awk -F \" '/^\t*"/ { print $2 }' COMPREPLY=($(compgen -W \ 'a ad adoy d dd e r u ud udoy' -- "$cur")) return ;; -*u) # TODO: could be parsed from "-u ." output COMPREPLY=($(compgen -W 's hms' -- "$cur")) return ;; -*W) COMPREPLY=($(compgen -W 'n' -- "$cur")) return ;; -*X) if [[ ${cur:${#prefix}} == lua_script:* ]]; then cur=${cur#*:} _filedir lua else COMPREPLY=($(compgen -P "$prefix" -W 'lua_script:' -- \ "${cur:${#prefix}}")) [[ ${COMPREPLY-} == *: ]] && compopt -o nospace fi return ;; -*G) COMPREPLY=($(compgen -W "$("$1" -G \? 2>/dev/null | awk '/^[ \t]*-G / \ { sub("^[[]","",$2); sub("[]]$","",$2); print $2 }')" \ -- "$cur")) return ;; esac if [[ $cur == -* ]]; then COMPREPLY=($(compgen -W '$(_parse_help "$1" -h 2>/dev/null)' \ -- "$cur")) return fi } && complete -F _tshark tshark # ex: filetype=sh