From c9e30d863f7ada92f3dd143e3333c380e480df81 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Sat, 3 Feb 2018 15:15:41 +0800 Subject: [PATCH] update predefined --- src/strategies/predefined.zsh | 8 ++++++-- zsh-autosuggestions.zsh | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/strategies/predefined.zsh b/src/strategies/predefined.zsh index 0c699d5..534781c 100644 --- a/src/strategies/predefined.zsh +++ b/src/strategies/predefined.zsh @@ -5,10 +5,13 @@ # configuration: # # ZSH_AUTOSUGGEST_PREDEFINE_NAME - auto generated predefine file name -# ZSH_AUTOSUGGEST_PREDEFINE_PATH - user defined files joined by semicolon +# ZSH_AUTOSUGGEST_PREDEFINE_PATH - user defined files separated by semicolon # # "$HOME/.zsh_autosuggest" will be generated at the first time # +# zsh-autosuggestions/predefined.txt is generated from tldr pages and +# will ship with predefined.zsh . +# _zsh_autosuggest_script_path="${0:A:h}" @@ -51,11 +54,12 @@ _zsh_autosuggest_predefined_generate() { done done cd "${pwd}" + + # TODO: generate command parameters from completion database print -l $suggests >> "$pname" } -# echo "sourced predefined" _zsh_autosuggest_strategy_predefined() { emulate -L zsh diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 887e6dd..b28d6dd 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -571,10 +571,13 @@ _zsh_autosuggest_strategy_match_prev_cmd() { # configuration: # # ZSH_AUTOSUGGEST_PREDEFINE_NAME - auto generated predefine file name -# ZSH_AUTOSUGGEST_PREDEFINE_PATH - user defined files joined by semicolon +# ZSH_AUTOSUGGEST_PREDEFINE_PATH - user defined files separated by semicolon # # "$HOME/.zsh_autosuggest" will be generated at the first time # +# zsh-autosuggestions/predefined.txt is generated from tldr pages and +# will ship with predefined.zsh . +# _zsh_autosuggest_script_path="${0:A:h}" @@ -617,11 +620,12 @@ _zsh_autosuggest_predefined_generate() { done done cd "${pwd}" + + # TODO: generate command parameters from completion database print -l $suggests >> "$pname" } -# echo "sourced predefined" _zsh_autosuggest_strategy_predefined() { emulate -L zsh