if [[ -f $e ]] {
IFS=$'\0' read -r sock pid <$e
}
- if ([[ -S $sock && $pid > 0 ]] && kill -0 $pid >/dev/null 2>&1) {
+ if {[[ -S $sock && $pid > 0 ]] && kill -0 $pid >/dev/null 2>&1} {
[[ -o interactive ]] && print -P "Reusing agent PID $pid%f"
export SSH_AUTH_SOCK=$sock
export SSH_AGENT_PID=$pid
# NOTE: called before setup and on logout: remove the dir we
# will be using (it's stale) or the dir we did use, and any
# dead sessions if present
- if (_sev_checkpid ${x:t}) {
+ if {_sev_checkpid ${x:t}} {
find $x -mindepth 1 -maxdepth 1 | while {read -r y} {
# XXX: real dirs will stop unlink, consider it a feature
unlink $y
find -L $_sev_tmp -mindepth 1 -maxdepth 1 -name '.session.*' -type d |
while {read -r x} {
# NOTE: same rationale as above
- if (_sev_checkpid ${${x:t}#.session.}) {
+ if {_sev_checkpid ${${x:t}#.session.}} {
rm -rf $x
}
}
_t=$_sev_tmp/.session.$$
# XXX: we probably shouldn't allow the use of an existing dir—tmp dir for
# current pid should have been removed by zcleanup
- if ([[ ! -d $_t ]] && ! mkdir -m700 $_t 2>/dev/null) {
+ if {[[ ! -d $_t ]] && ! mkdir -m700 $_t 2>/dev/null} {
[[ -o interactive ]] &&
print -P "%F{red}!!! Can't create session tmp subdir $_t, using $_sev_tmp%f"
_t=$_sev_tmp
}
find_keymap
if [[ -z $keymap ]] {
- if (read -q "?Can't read terminfo. Add new zkbd keymap? [y/N]") {
+ if {read -q "?Can't read terminfo. Add new zkbd keymap? [y/N]"} {
echo
{
autoload -Uz zkbd && zkbd