From f3d7b15cb33b7adab12d804df4e154486d4d086a Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Mon, 24 Mar 2025 00:15:07 +0900 Subject: [PATCH] refactor(alias-finder): Simplify --longer option activation --- plugins/alias-finder/alias-finder.plugin.zsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/alias-finder/alias-finder.plugin.zsh b/plugins/alias-finder/alias-finder.plugin.zsh index a4c1d2423..09da9849c 100644 --- a/plugins/alias-finder/alias-finder.plugin.zsh +++ b/plugins/alias-finder/alias-finder.plugin.zsh @@ -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