diff --git a/rc/bashrc b/rc/bashrc index 97f07945..92e5c994 100755 --- a/rc/bashrc +++ b/rc/bashrc @@ -131,7 +131,9 @@ fi #shopt -s autocd # Show the hostname, uptime and users logged in on shell start -(hostname &) +if hash hostname 2>/dev/null; then + (hostname &) +fi (uptime &) (echo "") if [[ $UNAME != Darwin ]]; then diff --git a/rc/zshrc b/rc/zshrc index 28be4ac6..a2fabb3f 100755 --- a/rc/zshrc +++ b/rc/zshrc @@ -87,7 +87,9 @@ zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' # Show the hostname, uptime and users logged in on shell start -(hostname&) +if hash hostname 2>/dev/null; then + (hostname&) +fi (uptime&) (echo "")