From bda53dc6d5135750c52f59b9cfbab39b161c0919 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 15 Mar 2008 01:09:05 +0000 Subject: Functions/Misc/zkbd: add -h to local declaration in is-this-a-function test. Use $DISPLAY when we have one instead of only $VENDOR-$OSTYPE as file name suffix. Add some knowledge of the MULTIBYTE option and its effects. --- ChangeLog | 7 +++++++ Functions/Misc/zkbd | 37 +++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34b625a52..755a0e9c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-14 Barton E. Schaefer + + * unposted (see 24709): Functions/Misc/zkbd: add -h to local + declaration in is-this-a-function test. Use $DISPLAY when we + have one instead of only $VENDOR-$OSTYPE as file name suffix. + Add some knowledge of the MULTIBYTE option and its effects. + 2008-03-14 Peter Stephenson * 24712: Src/utils.c: handling of backticks when being requoted diff --git a/Functions/Misc/zkbd b/Functions/Misc/zkbd index a1007cc65..a28354b07 100644 --- a/Functions/Misc/zkbd +++ b/Functions/Misc/zkbd @@ -1,8 +1,8 @@ #!/bin/zsh -f [[ -o interactive ]] && { - local -i ARGC - (ARGC=0) 2>/dev/null || { + local -hi ARGC # local is a no-op outside of a function + (ARGC=0) 2>/dev/null || { # so ARGC remains read-only for "source" print -u2 ${0}: must be run as a function or shell script, not sourced return 1 } @@ -118,21 +118,33 @@ else unset alt fi -(( $+alt + $+meta == 0 )) && cat <