summaryrefslogtreecommitdiff
path: root/Functions/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Misc')
-rw-r--r--Functions/Misc/nslookup3
-rw-r--r--Functions/Misc/zargs4
-rw-r--r--Functions/Misc/zed17
3 files changed, 16 insertions, 8 deletions
diff --git a/Functions/Misc/nslookup b/Functions/Misc/nslookup
index 150bd035c..8c11909d5 100644
--- a/Functions/Misc/nslookup
+++ b/Functions/Misc/nslookup
@@ -26,8 +26,7 @@ zstyle -s ':nslookup' pager tmp &&
zpty nslookup command nslookup "${(q)@}"
-zpty -r nslookup line '*
-> '
+zpty -r nslookup line '*> '
print -nr "$line"
while line=''; vared -he "$pmpt[@]" line; do
diff --git a/Functions/Misc/zargs b/Functions/Misc/zargs
index 71fd42835..28ebca78f 100644
--- a/Functions/Misc/zargs
+++ b/Functions/Misc/zargs
@@ -73,7 +73,7 @@
emulate -L zsh || return 1
local -a opts eof n s l P i
-local ZARGS_VERSION="1.4"
+local ZARGS_VERSION="1.5"
if zparseopts -a opts -D -- \
-eof::=eof e::=eof \
@@ -254,7 +254,7 @@ then
bg='&'
if zmodload -i zsh/parameter 2>/dev/null
then
- wait='wait %${(k)^jobstates[(R)running:*]}'
+ wait='wait ${${jobstates[(R)running:*]/#*:/}/%=*/}'
else
wait='wait'
fi
diff --git a/Functions/Misc/zed b/Functions/Misc/zed
index c2caaf3f5..010b69bee 100644
--- a/Functions/Misc/zed
+++ b/Functions/Misc/zed
@@ -9,8 +9,9 @@
local var opt zed_file_name
# We do not want timeout while we are editing a file
integer TMOUT=0 okargs=1 fun bind
+local -a expand
-while getopts "fb" opt; do
+while getopts "fbx:" opt; do
case $opt in
(f)
fun=1
@@ -19,6 +20,14 @@ while getopts "fb" opt; do
(b)
bind=1
;;
+
+ (x)
+ if [[ $OPTARG != <-> ]]; then
+ print -r "Integer expected after -x: $OPTARG" >&2
+ return 1
+ fi
+ expand=(-x $OPTARG)
+ ;;
esac
done
shift $(( OPTIND - 1 ))
@@ -29,8 +38,8 @@ shift $(( OPTIND - 1 ))
if (( $# != okargs )); then
echo 'Usage:
zed filename
-zed -f function
-zed -b'
+zed -f [ -x N ] function
+zed -b' >&2
return 1
fi
@@ -71,7 +80,7 @@ fi
setopt localoptions nobanghist
if ((fun)) then
- var="$(functions $1)"
+ var="$(functions $expand $1)"
# If function is undefined but autoloadable, load it
if [[ $var = *\#\ undefined* ]] then
var="$(autoload +X $1; functions $1)"