diff --git a/completions/gphoto2 b/completions/gphoto2 index 88b28da2..26e0b8df 100644 --- a/completions/gphoto2 +++ b/completions/gphoto2 @@ -24,14 +24,14 @@ _gphoto2() ;; --port) COMPREPLY=( $(compgen -W "$( $1 --list-ports 2>/dev/null | \ - tail -n +4 | awk '{ print $1 }' )" -- "$cur") ) + awk 'NR>3 { print $1 }' )" -- "$cur") ) __ltrim_colon_completions "$cur" return 0 ;; --camera) local IFS=$'\n' COMPREPLY=( $(compgen -W "$( $1 --list-cameras 2>/dev/null | \ - tail -n +3 | awk -F'"' '{ print $2 }' )" -- "$cur") ) + awk -F'"' 'NR>2 { print $2 }' )" -- "$cur") ) return 0 ;; --get-config|--set-config|--set-config-index|--set-config-value)