Merge branch 'master' into refactor/alias-finder

This commit is contained in:
Roeniss Moon 2025-03-26 10:12:50 +09:00 committed by GitHub
commit 121ff231a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 2 deletions

View file

@ -33,6 +33,10 @@ alias-finder() {
# make filter to find only shorter results than current cmd
if [[ $cheaper == true ]]; then
cmdLen=$(echo -n "$cmd" | wc -c)
if [[ $cmdLen -le 1 ]]; then
return
fi
filter="^'?.{1,$((cmdLen - 1))}'?=" # some aliases is surrounded by single quotes
fi