[zsh] remove warning using -a option of hostname
This commit is contained in:
parent
8747c4dba6
commit
4aed928574
8
.zshrc
8
.zshrc
@ -37,11 +37,17 @@ USER=${USER:-`whoami`}
|
||||
UID=${UID:-`id -u`}
|
||||
HOST=$HOST:r
|
||||
HOST=${HOST:-$(hostname -s)}
|
||||
DOMAIN=${DOMAIN:-$(hostname -a | sed 's/^[^\.]*\.\?//')}
|
||||
DOMAIN=${DOMAIN:-$(hostname -a 2>&-| sed 's/^[^\.]*\.\?//')}
|
||||
DOMAIN=${DOMAIN:-$(hostname -d 2>&-)}
|
||||
DOMAIN=${DOMAIN:-$(hostname -y 2>&-)}
|
||||
[ "$DOMAIN" = "" -o "$DOMAIN" = "localdomain" -o "$DOMAIN" = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2)
|
||||
|
||||
## Agent de clefs SSH/GPG
|
||||
KEYCHAIN=~/.keychain/$(hostname)-sh
|
||||
[ -r "${KEYCHAIN}" ] && source ${KEYCHAIN}
|
||||
[ -r "${KEYCHAIN}-gpg" ] && source ${KEYCHAIN}-gpg
|
||||
|
||||
|
||||
DEBUG=${DEBUG:-no}
|
||||
|
||||
export USER HOST DOMAIN UID
|
||||
|
Loading…
Reference in New Issue
Block a user