gphoto2: Replace tail with awk
This commit is contained in:
parent
7d3de619d1
commit
89add74ae0
@ -24,14 +24,14 @@ _gphoto2()
|
|||||||
;;
|
;;
|
||||||
--port)
|
--port)
|
||||||
COMPREPLY=( $(compgen -W "$( $1 --list-ports 2>/dev/null | \
|
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"
|
__ltrim_colon_completions "$cur"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--camera)
|
--camera)
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
COMPREPLY=( $(compgen -W "$( $1 --list-cameras 2>/dev/null | \
|
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
|
return 0
|
||||||
;;
|
;;
|
||||||
--get-config|--set-config|--set-config-index|--set-config-value)
|
--get-config|--set-config|--set-config-index|--set-config-value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user