lib/utilities: new function `_bash-it-egrep()`
The existing function `_bash-it-grep()` is weird. New function `_bash-it-egrep()` just does the thing without requiring two subshells and manual invocation.pull/1973/head
parent
b8ee63c67d
commit
253d1213e0
|
|
@ -65,6 +65,12 @@ function _bash-it-grep() {
|
|||
printf "%s" "${BASH_IT_GREP:-'/usr/bin/grep'}"
|
||||
}
|
||||
|
||||
# Runs `grep` with extended regular expressions
|
||||
function _bash-it-egrep() {
|
||||
: "${BASH_IT_GREP:=$(type -p egrep || type -p grep)}"
|
||||
"${BASH_IT_GREP:-/usr/bin/grep}" -E "$@"
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
# Component-specific functions (component is either an alias, a plugin, or a
|
||||
# completion).
|
||||
|
|
|
|||
Loading…
Reference in New Issue