mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-04-20 16:08:00 +00:00
doc(alias-finder): Add note for defect in option settings
This commit is contained in:
parent
4fa13eb463
commit
d860c7548f
|
@ -1,19 +1,18 @@
|
||||||
alias-finder() {
|
alias-finder() {
|
||||||
local cmd=" " exact="" longer="" cheaper="" wordEnd="'{0,1}$" finder="" filter=""
|
local cmd=" " exact=false longer=false cheaper=false wordEnd="'?$" finder="" filter=""
|
||||||
|
|
||||||
# build command and options
|
# setup options
|
||||||
|
# XXX: This logic has flaw. If user enable options with zstyle, there's no way to disable it.
|
||||||
|
# It's because same function is used for autoload hook and manual execution.
|
||||||
|
# I believe manual execution is very minor in use, so I'll keep it as is for now.
|
||||||
for c in "$@"; do
|
for c in "$@"; do
|
||||||
case $c in
|
case $c in
|
||||||
# TODO: Remove backward compatibility (other than zstyle form)
|
|
||||||
# set options if exist
|
|
||||||
-e|--exact) exact=true;;
|
-e|--exact) exact=true;;
|
||||||
-l|--longer) longer=true;;
|
-l|--longer) longer=true;;
|
||||||
-c|--cheaper) cheaper=true;;
|
-c|--cheaper) cheaper=true;;
|
||||||
# concatenate cmd
|
|
||||||
*) cmd="$cmd$c " ;;
|
*) cmd="$cmd$c " ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
zstyle -t ':omz:plugins:alias-finder' longer && longer=true
|
zstyle -t ':omz:plugins:alias-finder' longer && longer=true
|
||||||
zstyle -t ':omz:plugins:alias-finder' exact && exact=true
|
zstyle -t ':omz:plugins:alias-finder' exact && exact=true
|
||||||
zstyle -t ':omz:plugins:alias-finder' cheaper && cheaper=true
|
zstyle -t ':omz:plugins:alias-finder' cheaper && cheaper=true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user