mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 01:52:31 +01:00
refactor(alias-finder): Simplify --longer option activation
This commit is contained in:
parent
d860c7548f
commit
3a746a7ee1
1 changed files with 1 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue