From 7c670f1e6a0e154f0b1a2d4b6eed0e71c9404b56 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sat, 3 Jul 1999 13:16:46 +0000 Subject: zsh-3.1.5-pws-25 --- Completion/Commands/.distfiles | 2 +- Completion/Commands/_expand_word | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Completion/Commands/_expand_word (limited to 'Completion/Commands') diff --git a/Completion/Commands/.distfiles b/Completion/Commands/.distfiles index 19a02ef39..7b2a319fe 100644 --- a/Completion/Commands/.distfiles +++ b/Completion/Commands/.distfiles @@ -1,3 +1,3 @@ DISTFILES_SRC=' - .distfiles _correct_filename _correct_word _most_recent_file + .distfiles _correct_filename _correct_word _expand_word _most_recent_file ' diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word new file mode 100644 index 000000000..570f06987 --- /dev/null +++ b/Completion/Commands/_expand_word @@ -0,0 +1,26 @@ +#compdef -k complete-word \C-xe + +# Simple completion front-end implementing expansion. +# +# If configurations keys with the prefix `expandword_' are +# given they override those starting with `expand_'. + +local oes="$compconfig[expand_substitute]" +local oeg="$compconfig[expand_glob]" +local oem="$compconfig[expand_menu]" +local oeo="$compconfig[expand_original]" +local oep="$compconfig[expand_prompt]" + +compconfig[expand_substitute]="${compconfig[expandword_substitute]}" +compconfig[expand_glob]="${compconfig[expandword_glob]-$oeg}" +compconfig[expand_menu]="${compconfig[expandword_menu]-$oem}" +compconfig[expand_original]="${compconfig[expandword_original]-$oeo}" +compconfig[expand_prompt]="${compconfig[expandword_prompt]-$oep}" + +_main_complete _expand + +compconfig[expand_substitute]="$oes" +compconfig[expand_glob]="$oeg" +compconfig[expand_menu]="$oem" +compconfig[expand_original]="$oeo" +compconfig[expand_prompt]="$oep" -- cgit 1.4.1