update predefined

This commit is contained in:
skywind3000 2018-02-03 14:35:27 +08:00
parent 8ee6d01973
commit 420f370747
2 changed files with 10 additions and 12 deletions

View file

@ -23,11 +23,6 @@ _zsh_autosuggest_predefined_generate() {
echo "autosuggestions is generating: $pname"
# copy builtin predefine database
local txt="${_zsh_autosuggest_script_path}/predefined.txt"
[ -f "$txt" ] && cat "$txt" > "$pname" || touch "$pname"
# enumerate commands in $PATH and add them to ~/.zsh_autosuggest
for p ("${(@s/:/)PATH}"); do
cd "$p"
@ -52,7 +47,11 @@ _zsh_autosuggest_predefined_generate() {
done
cd "${pwd}"
print -l $suggests >> "$pname"
print -l $suggests > "$pname"
# copy builtin predefine database
local txt="${_zsh_autosuggest_script_path}/predefined.txt"
cat "$txt" >> "$pname"
}
# echo "sourced predefined"

View file

@ -589,11 +589,6 @@ _zsh_autosuggest_predefined_generate() {
echo "autosuggestions is generating: $pname"
# copy builtin predefine database
local txt="${_zsh_autosuggest_script_path}/predefined.txt"
[ -f "$txt" ] && cat "$txt" > "$pname" || touch "$pname"
# enumerate commands in $PATH and add them to ~/.zsh_autosuggest
for p ("${(@s/:/)PATH}"); do
cd "$p"
@ -618,7 +613,11 @@ _zsh_autosuggest_predefined_generate() {
done
cd "${pwd}"
print -l $suggests >> "$pname"
print -l $suggests > "$pname"
# copy builtin predefine database
local txt="${_zsh_autosuggest_script_path}/predefined.txt"
cat "$txt" >> "$pname"
}
# echo "sourced predefined"