mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-04-13 18:12:58 +00:00
refactor(alias-finder): Simplify --longer option activation
This commit is contained in:
parent
92fb85e498
commit
f3d7b15cb3
|
@ -39,10 +39,7 @@ alias-finder() {
|
|||
alias | grep -E "$filter" | grep -E "=$finder"
|
||||
|
||||
$exact && break # because exact case is only one
|
||||
|
||||
if [[ $longer = true ]]; then
|
||||
break # because above grep command already found every longer aliases during first cycle
|
||||
fi
|
||||
$longer && break # because above grep command already found every longer aliases during first cycle
|
||||
|
||||
cmd=$(sed -E 's/ {0,}[^ ]*$//' <<< "$cmd") # remove last word
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user