[Bash-completion-commits] [bash-completion] 03/03: gphoto2: Replace tail with awk

Ville Skyttä scop-guest at moszumanska.debian.org
Sun Nov 16 10:26:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit 89add74ae07d17eaaff811159e086663e4791d85
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Nov 16 12:24:40 2014 +0200

    gphoto2: Replace tail with awk
---
 completions/gphoto2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/completions/gphoto2 b/completions/gphoto2
index 88b28da..26e0b8d 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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list