mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-04-08 18:43:41 +00:00
refactor(alias-finder): Simplify --longer option activation
This commit is contained in:
parent
d860c7548f
commit
3a746a7ee1
|
@ -24,9 +24,7 @@ alias-finder() {
|
|||
## - add escaping character to special characters
|
||||
cmd=$(echo -n "$cmd" | tr '\n' ' ' | xargs | tr -s '[:space:]' | sed 's/[].\|$(){}?+*^[]/\\&/g')
|
||||
|
||||
if [[ $longer == true ]]; then
|
||||
wordEnd="" # remove wordEnd to find longer aliases
|
||||
fi
|
||||
$longer && wordEnd=".*$"
|
||||
|
||||
# find with alias and grep, removing last word each time until no more words
|
||||
while [[ $cmd != "" ]]; do
|
||||
|
|
Loading…
Reference in New Issue
Block a user