Jelajahi Sumber

fix(completions): remove stray backslashes

Grep 3.8 causes warnings on regular expressions
with stray backslashes.
Aidan Denlinger 2 tahun lalu
induk
melakukan
41fe590607
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      completions/bash/eza

+ 2 - 2
completions/bash/eza

@@ -38,13 +38,13 @@ _eza()
         # _parse_help doesn’t pick up short options when they are on the same line than long options
         --*)
             # colo[u]r isn’t parsed correctly so we filter these options out and add them by hand
-            parse_help=$( eza --help | grep -oE ' (\-\-[[:alnum:]@-]+)' | tr -d ' ' | grep -v '\-\-colo' )
+            parse_help=$( eza --help | grep -oE ' (--[[:alnum:]@-]+)' | tr -d ' ' | grep -v '\--colo' )
             completions=$( echo '--color --colour --color-scale --colour-scale' $parse_help )
             COMPREPLY=( $( compgen -W "$completions" -- "$cur" ) )
             ;;
 
         -*)
-            completions=$( eza --help | grep -oE ' (\-[[:alnum:]@])' | tr -d ' ' )
+            completions=$( eza --help | grep -oE ' (-[[:alnum:]@])' | tr -d ' ' )
             COMPREPLY=( $( compgen -W "$completions" -- "$cur" ) )
             ;;