summary refs log tree commit diff
path: root/Functions/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-10-21 09:51:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-10-21 09:51:54 +0000
commitc2ff977ddb1b8892fd1e374f3360b70290cfeabb (patch)
tree53997be89813fd70c6ee9bb92e1273402b9bf090 /Functions/Zle
parent014402141335585cd6e597f74ca3b9feddddf985 (diff)
downloadzsh-c2ff977ddb1b8892fd1e374f3360b70290cfeabb.tar.gz
zsh-c2ff977ddb1b8892fd1e374f3360b70290cfeabb.tar.xz
zsh-c2ff977ddb1b8892fd1e374f3360b70290cfeabb.zip
21898: insert-composed-char can take command line argument
21899: add "roadmap" to manual
Diffstat (limited to 'Functions/Zle')
-rw-r--r--Functions/Zle/insert-composed-char18
1 files changed, 16 insertions, 2 deletions
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]})