diff --git a/completions/django.completion.sh b/completions/django.completion.sh index 24a5b73..7101607 100644 --- a/completions/django.completion.sh +++ b/completions/django.completion.sh @@ -44,10 +44,10 @@ _python_django_completion() { if [[ ${COMP_CWORD} -ge 2 ]]; then PYTHON_EXE=$( basename -- ${COMP_WORDS[0]} ) - echo $PYTHON_EXE | egrep "python([2-9]\.[0-9])?" >/dev/null 2>&1 + echo $PYTHON_EXE | command grep -E "python([2-9]\.[0-9])?" >/dev/null 2>&1 if [[ $? == 0 ]]; then PYTHON_SCRIPT=$( basename -- ${COMP_WORDS[1]} ) - echo $PYTHON_SCRIPT | egrep "manage\.py|django-admin(\.py)?" >/dev/null 2>&1 + echo $PYTHON_SCRIPT | command grep -E "manage\.py|django-admin(\.py)?" >/dev/null 2>&1 if [[ $? == 0 ]]; then COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]:1}" \ COMP_CWORD=$(( COMP_CWORD-1 )) \ diff --git a/completions/fabric-completion.sh b/completions/fabric-completion.sh index 4653a46..8139d13 100644 --- a/completions/fabric-completion.sh +++ b/completions/fabric-completion.sh @@ -91,7 +91,7 @@ function __fab_completion() { -*) if [[ -z "${__FAB_COMPLETION_LONG_OPT}" ]]; then export __FAB_COMPLETION_LONG_OPT=$( - fab --help | egrep -o "\-\-[A-Za-z_\-]+\=?" | sort -u) + fab --help | command grep -Eo "\-\-[A-Za-z_\-]+\=?" | sort -u) fi opts="${__FAB_COMPLETION_LONG_OPT}" ;; @@ -101,7 +101,7 @@ function __fab_completion() { # -*) # if [[ -z "${__FAB_COMPLETION_SHORT_OPT}" ]]; then # export __FAB_COMPLETION_SHORT_OPT=$( - # fab --help | egrep -o "^ +\-[A-Za-z_\]" | sort -u) + # fab --help | command grep -Eo "^ +\-[A-Za-z_\]" | sort -u) # fi # opts="${__FAB_COMPLETION_SHORT_OPT}" # ;; diff --git a/completions/vault.completion.sh b/completions/vault.completion.sh index ab42898..e1a540a 100644 --- a/completions/vault.completion.sh +++ b/completions/vault.completion.sh @@ -17,7 +17,7 @@ function _vault_mounts() { } function _vault() { - local VAULT_COMMANDS=$(vault 2>&1 | egrep '^ +' | awk '{print $1}') + local VAULT_COMMANDS=$(vault 2>&1 | command grep -E '^ +' | awk '{print $1}') local cur local prev diff --git a/lib/grep.sh b/lib/grep.sh index 43d8d4a..a90f5fe 100644 --- a/lib/grep.sh +++ b/lib/grep.sh @@ -24,8 +24,11 @@ fi # export grep settings if ((${#_omb_grep_options[@]} > 0)); then _omb_util_alias grep="grep ${_omb_grep_options[*]}" - _omb_util_alias fgrep="fgrep ${_omb_grep_options[*]}" - _omb_util_alias egrep="egrep ${_omb_grep_options[*]}" + _omb_util_alias fgrep="grep -F ${_omb_grep_options[*]}" + _omb_util_alias egrep="grep -E ${_omb_grep_options[*]}" +else + _omb_util_alias fgrep='grep -F' + _omb_util_alias egrep='grep -E' fi # clean up diff --git a/themes/brainy/brainy.theme.sh b/themes/brainy/brainy.theme.sh index 6a96ff7..46ee97f 100644 --- a/themes/brainy/brainy.theme.sh +++ b/themes/brainy/brainy.theme.sh @@ -139,7 +139,7 @@ ___brainy_prompt_todo() { _omb_util_binary_exists todo.sh || return color=$_omb_prompt_bold_white box="[|]" - info="t:$(todo.sh ls | egrep "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }' )" + info="t:$(todo.sh ls | command grep -E "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }' )" printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_green}" "${box}" }