mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 03:09:22 +01:00
shellrc: check if hostname exists before displaying it
Resolves: SteamOS doesn't have the command
This commit is contained in:
parent
9bc7bb0f18
commit
1e3a81a0e1
@ -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
|
||||
|
4
rc/zshrc
4
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 "")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user