}
}
# reset GNUPGHOME if we removed our own dir
- if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]] {
- x=$GNUPGHOME
- [[ -o GLOB_ASSIGN ]]; y=$?
- setopt GLOB_ASSIGN
- GNUPGHOME=$GNUPGHOME/../..(:a)
- (( y != 0 )) && unsetopt GLOB_ASSIGN
- }
+ if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]]
+ GNUPGHOME=${GNUPGHOME%$MATCH}
}
## tmp