aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrtisdale <rob@breakbeat.tech>2022-09-12 17:51:37 +0200
committerrtisdale <rob@breakbeat.tech>2022-09-12 17:51:37 +0200
commite6fdabb97d8fc01c3eb7322f623638f5311db75f (patch)
treed902f464db4183b60b91f0068a4fa9151eb5429a /src
parentMerge pull request #888 from zsh-users/fix-typo (diff)
downloadzsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar.gz
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar.bz2
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar.lz
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar.xz
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.tar.zst
zsh-completions-e6fdabb97d8fc01c3eb7322f623638f5311db75f.zip
Utilize grep -E instead of deprecated/obsolescent egrep
Diffstat (limited to 'src')
-rw-r--r--src/_vagrant2
-rw-r--r--src/_virtualbox6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/_vagrant b/src/_vagrant
index 6048a17..64ca0f4 100644
--- a/src/_vagrant
+++ b/src/_vagrant
@@ -156,7 +156,7 @@ __vm_list ()
then
_vagrant_vms=( $(_call_program path-all "vagrant status | \
awk '{print \$1}' | \
- egrep -v '^$|^(Current|This|above|VM,)$'" ) )
+ grep -Ev '^$|^(Current|This|above|VM,)$'" ) )
_store_cache VAGRANT_VMS _vagrant_vms
fi
diff --git a/src/_virtualbox b/src/_virtualbox
index 5f25b56..03b49d6 100644
--- a/src/_virtualbox
+++ b/src/_virtualbox
@@ -16,7 +16,7 @@
_vboxmachines() {
- VBoxManage list vms | egrep -o '^"[^"]+"' 2>/dev/null | sed -e 's|"||g' | while read machine; do
+ VBoxManage list vms | grep -Eo '^"[^"]+"' 2>/dev/null | sed -e 's|"||g' | while read machine; do
_wanted 'machine' expl 'machine' compadd $machine
done
}
@@ -35,7 +35,7 @@ _vboxcommandoptions() {
optcount=0
option=""
optlines=()
- echo "$cmdoutput" | egrep -o ' [\[A-Za-z0-9\-\<].*' | while read line; do
+ echo "$cmdoutput" | grep -Eo ' [\[A-Za-z0-9\-\<].*' | while read line; do
option="${option}${line}"
if [[ $line[-1] != '|' ]]; then
optcount=$(($optcount+1))
@@ -46,7 +46,7 @@ _vboxcommandoptions() {
# optionals ([abc])
for line in $optlines; do
- echo "$line" | egrep -o '\[[^]]+\]' | while read option; do
+ echo "$line" | grep -Eo '\[[^]]+\]' | while read option; do
option=$(echo $option | sed 's|[]\[]||g' | cut -d ' ' -f 1)
_options=(${(s:|:)option})
for option in $_options; do