diff options
| author | rtisdale <rob@breakbeat.tech> | 2022-09-12 17:51:37 +0200 |
|---|---|---|
| committer | rtisdale <rob@breakbeat.tech> | 2022-09-12 17:51:37 +0200 |
| commit | e6fdabb97d8fc01c3eb7322f623638f5311db75f (patch) | |
| tree | d902f464db4183b60b91f0068a4fa9151eb5429a /src/_virtualbox | |
| parent | Merge pull request #888 from zsh-users/fix-typo (diff) | |
| download | zsh-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/_virtualbox')
| -rw-r--r-- | src/_virtualbox | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
