From c2ff977ddb1b8892fd1e374f3360b70290cfeabb Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 21 Oct 2005 09:51:54 +0000 Subject: 21898: insert-composed-char can take command line argument 21899: add "roadmap" to manual --- Functions/Zle/insert-composed-char | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Functions/Zle') diff --git a/Functions/Zle/insert-composed-char b/Functions/Zle/insert-composed-char index 7b97c96d4..2ed008990 100644 --- a/Functions/Zle/insert-composed-char +++ b/Functions/Zle/insert-composed-char @@ -147,8 +147,22 @@ if (( ${+zsh_accented_chars} == 0 )); then unfunction define-composed-chars fi -read -k basechar || return 1 -read -k accent || return 1 +if (( $# )); then + basechar=${1[1]} + if [[ $1 = ? ]]; then + shift + else + 1=${1[2,-1]} + fi +else + read -k basechar || return 1 +fi + +if (( $# )); then + accent=${1[1]} +else + read -k accent || return 1 +fi local -A charmap charmap=(${=zsh_accented_chars[$accent]}) -- cgit 1.4.1