summaryrefslogtreecommitdiff
path: root/completions/tshark
diff options
context:
space:
mode:
Diffstat (limited to 'completions/tshark')
-rw-r--r--completions/tshark4
1 files changed, 2 insertions, 2 deletions
diff --git a/completions/tshark b/completions/tshark
index 34d93a0d..bd795c24 100644
--- a/completions/tshark
+++ b/completions/tshark
@@ -51,9 +51,9 @@ _tshark()
;;
-O)
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $( compgen -P "$prefix" -W \
- "$( "$1" -G protocols 2>&1 | cut -f 3 )" \
+ COMPREPLY=( $( compgen -W "$( "$1" -G protocols 2>&1 | cut -f 3 )" \
-- "${cur##*,}" ) )
+ [[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
-T)