mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +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
|
#shopt -s autocd
|
||||||
|
|
||||||
# Show the hostname, uptime and users logged in on shell start
|
# Show the hostname, uptime and users logged in on shell start
|
||||||
(hostname &)
|
if hash hostname 2>/dev/null; then
|
||||||
|
(hostname &)
|
||||||
|
fi
|
||||||
(uptime &)
|
(uptime &)
|
||||||
(echo "")
|
(echo "")
|
||||||
if [[ $UNAME != Darwin ]]; then
|
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'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
# Show the hostname, uptime and users logged in on shell start
|
# Show the hostname, uptime and users logged in on shell start
|
||||||
(hostname&)
|
if hash hostname 2>/dev/null; then
|
||||||
|
(hostname&)
|
||||||
|
fi
|
||||||
(uptime&)
|
(uptime&)
|
||||||
(echo "")
|
(echo "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user