From 3b550a69f6f9bc2c8466458a8dea6e5d5c93c491 Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Sun, 23 Mar 2025 23:49:46 +0900 Subject: [PATCH] refactor(alias-finder): Simplify --exact option activation --- plugins/alias-finder/alias-finder.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/alias-finder/alias-finder.plugin.zsh b/plugins/alias-finder/alias-finder.plugin.zsh index 93952664b..a9ef132f2 100644 --- a/plugins/alias-finder/alias-finder.plugin.zsh +++ b/plugins/alias-finder/alias-finder.plugin.zsh @@ -38,9 +38,9 @@ alias-finder() { alias | grep -E "$filter" | grep -E "=$finder" - if [[ $exact == true ]]; then - break # because exact case is only one - elif [[ $longer = true ]]; then + $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