mirror of
https://github.com/zsh-users/zsh
synced 2024-10-14 11:53:24 +00:00
TCP functions: fix some variable handling problems,
also standardise indentation add-zsh-hook: fix check for existence of hook function in existing hook
This commit is contained in:
parent
dc72699b6c
commit
5e7e797ca9
11
ChangeLog
11
ChangeLog
|
@ -1,5 +1,16 @@
|
||||||
|
2008-08-01 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* unposted: Functions/Misc/add-zsh-hook: testing for existence
|
||||||
|
of hook function when hook was already defined was broken.
|
||||||
|
|
||||||
|
* unposted: Functions/TCP/tcp_open, Functions/TCP/tcp_sess:
|
||||||
|
improve some variable handling and standardise some indentation.
|
||||||
|
|
||||||
2008-07-31 Peter Stephenson <pws@csr.com>
|
2008-07-31 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 25364: Doc/Zsh/params.yo, Src/params.c, Test/D06subscript.ztst:
|
||||||
|
(k) hash subscript didn't work due to sense of test.
|
||||||
|
|
||||||
* 25345, 25347: Src/builtin.c, Src/exec.c, Src/hist.c, Src/init.c,
|
* 25345, 25347: Src/builtin.c, Src/exec.c, Src/hist.c, Src/init.c,
|
||||||
Src/input.c, Src/jobs.c, Src/loop.c, Src/options.c, Src/signals.c,
|
Src/input.c, Src/jobs.c, Src/loop.c, Src/options.c, Src/signals.c,
|
||||||
Src/utils.c, Src/zsh.h, Src/Zle/zle_main.c: Neaten interface
|
Src/utils.c, Src/zsh.h, Src/Zle/zle_main.c: Neaten interface
|
||||||
|
|
|
@ -66,7 +66,7 @@ if (( del )); then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if (( ${(P)+hook} )); then
|
if (( ${(P)+hook} )); then
|
||||||
if (( ${(P)hook[(I)$fn]} == 0 )); then
|
if (( ${${(P)hook}[(I)$fn]} == 0 )); then
|
||||||
set -A $hook ${(P)hook} $fn
|
set -A $hook ${(P)hook} $fn
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
@ -213,9 +213,12 @@ for sess in $sessnames; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -z $TCP_SESS ]]; then
|
if [[ -z $TCP_SESS || -z $tcp_by_name[$TCP_SESS] ]]; then
|
||||||
|
# careful in case we closed it again...
|
||||||
|
if [[ -n $tcp_by_name[$sessnames[1]] ]]; then
|
||||||
[[ -z $quiet ]] && print "Setting default TCP session $sessnames[1]"
|
[[ -z $quiet ]] && print "Setting default TCP session $sessnames[1]"
|
||||||
typeset -g TCP_SESS=$sessnames[1]
|
typeset -g TCP_SESS=$sessnames[1]
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return $stat
|
return $stat
|
||||||
|
|
|
@ -17,7 +17,7 @@ if [[ -n $1 ]]; then
|
||||||
eval $__cmd \$\*
|
eval $__cmd \$\*
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
TCP_SESS=$1
|
typeset -g TCP_SESS=$1
|
||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue