From e9c705f15579a812a9416de30548fb86633d6a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 7 Jul 2020 13:04:50 +0200 Subject: app-shells/lxd-zsh-completions: fix previous commit --- ...completions-20190522-fix-awk-syntax-error.patch | 34 ++++++++++++++++++++++ .../lxd-zsh-completions-fix-awk-syntax-error.patch | 34 ---------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 app-shells/lxd-zsh-completions/files/lxd-zsh-completions-20190522-fix-awk-syntax-error.patch delete mode 100644 app-shells/lxd-zsh-completions/files/lxd-zsh-completions-fix-awk-syntax-error.patch diff --git a/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-20190522-fix-awk-syntax-error.patch b/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-20190522-fix-awk-syntax-error.patch new file mode 100644 index 0000000..1884e68 --- /dev/null +++ b/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-20190522-fix-awk-syntax-error.patch @@ -0,0 +1,34 @@ +From d33f60339259e5e8a345b8b1091e3e4158758b27 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= +Date: Wed, 18 Sep 2019 09:53:10 +0200 +Subject: [PATCH] Fix awk script syntax error + +Space does not have to be escaped and awk is annoyingly producing +warning about it to terminal. +This just removes unnecessary escape of spaces in regexp. +--- + _lxc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/_lxc b/_lxc +index e9ef9f1..420be6d 100644 +--- a/_lxc ++++ b/_lxc +@@ -837,12 +837,12 @@ __lxc_containers_all () { + + __lxc_images_as_fingerprint () { + local -a _l +- _l=(${(@f)"$(_call_program images lxc image list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[\ \t]+/,"",a[i]);sub(/[\ \t]+$/,"",a[i]);}; (a[2]=="") ? b=" (not aliased)" : b=" (aliased as " a[2] ")" ; print a[3] ":" a[5] b }' )"}) ++ _l=(${(@f)"$(_call_program images lxc image list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[ \t]+/,"",a[i]);sub(/[ \t]+$/,"",a[i]);}; (a[2]=="") ? b=" (not aliased)" : b=" (aliased as " a[2] ")" ; print a[3] ":" a[5] b }' )"}) + _describe -t images_as_fingerprint 'Images as fingerprint' _l + } + + __lxc_images_as_alias () { +- _l=(${(@f)"$(_call_program images lxc image alias list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[\ \t]+/,"",a[i]);sub(/[\ \t]+$/,"",a[i]);}; (a[4]=="") ? b="" : b=" - " a[4] ;print a[2] ":" a[3] b }' )"}) ++ _l=(${(@f)"$(_call_program images lxc image alias list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[ \t]+/,"",a[i]);sub(/[ \t]+$/,"",a[i]);}; (a[4]=="") ? b="" : b=" - " a[4] ;print a[2] ":" a[3] b }' )"}) + _describe -t images_as_alias 'Images as alias' _l + } + +-- +2.27.0 + diff --git a/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-fix-awk-syntax-error.patch b/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-fix-awk-syntax-error.patch deleted file mode 100644 index 1884e68..0000000 --- a/app-shells/lxd-zsh-completions/files/lxd-zsh-completions-fix-awk-syntax-error.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d33f60339259e5e8a345b8b1091e3e4158758b27 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= -Date: Wed, 18 Sep 2019 09:53:10 +0200 -Subject: [PATCH] Fix awk script syntax error - -Space does not have to be escaped and awk is annoyingly producing -warning about it to terminal. -This just removes unnecessary escape of spaces in regexp. ---- - _lxc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/_lxc b/_lxc -index e9ef9f1..420be6d 100644 ---- a/_lxc -+++ b/_lxc -@@ -837,12 +837,12 @@ __lxc_containers_all () { - - __lxc_images_as_fingerprint () { - local -a _l -- _l=(${(@f)"$(_call_program images lxc image list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[\ \t]+/,"",a[i]);sub(/[\ \t]+$/,"",a[i]);}; (a[2]=="") ? b=" (not aliased)" : b=" (aliased as " a[2] ")" ; print a[3] ":" a[5] b }' )"}) -+ _l=(${(@f)"$(_call_program images lxc image list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[ \t]+/,"",a[i]);sub(/[ \t]+$/,"",a[i]);}; (a[2]=="") ? b=" (not aliased)" : b=" (aliased as " a[2] ")" ; print a[3] ":" a[5] b }' )"}) - _describe -t images_as_fingerprint 'Images as fingerprint' _l - } - - __lxc_images_as_alias () { -- _l=(${(@f)"$(_call_program images lxc image alias list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[\ \t]+/,"",a[i]);sub(/[\ \t]+$/,"",a[i]);}; (a[4]=="") ? b="" : b=" - " a[4] ;print a[2] ":" a[3] b }' )"}) -+ _l=(${(@f)"$(_call_program images lxc image alias list | tail -n +4 | egrep -e '^\|' | awk '{split($0,a,"|"); for(i in a){ sub(/^[ \t]+/,"",a[i]);sub(/[ \t]+$/,"",a[i]);}; (a[4]=="") ? b="" : b=" - " a[4] ;print a[2] ":" a[3] b }' )"}) - _describe -t images_as_alias 'Images as alias' _l - } - --- -2.27.0 - -- cgit v1.2.3