aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/prompt.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 10:48:02 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 10:48:02 +1200
commit044cd5905878fc6d2678f646685bc055d0b386e5 (patch)
treea6868b452948b30f0c18efbfd62114224b4490fe /sh/shrc.d/prompt.sh
parentExperiment with abbreviated prompt (diff)
downloaddotfiles-044cd5905878fc6d2678f646685bc055d0b386e5.tar.gz
dotfiles-044cd5905878fc6d2678f646685bc055d0b386e5.zip
Use whoami(1) rather than `id -nu`
A little bit clearer, and still POSIX; FreeBSD and OpenBSD seem to both have it
Diffstat (limited to 'sh/shrc.d/prompt.sh')
-rw-r--r--sh/shrc.d/prompt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/shrc.d/prompt.sh b/sh/shrc.d/prompt.sh
index ef3009ae..dff42f05 100644
--- a/sh/shrc.d/prompt.sh
+++ b/sh/shrc.d/prompt.sh
@@ -1,3 +1,3 @@
# Basic PS1 for POSIX shell
# Does every POSIX shell support these? dash does, at least.
-PS1=$(printf '%s@%s$ ' "$(id -nu)" "$(hostname -s)")
+PS1=$(printf '%s@%s$ ' "$(whoami)" "$(hostname -s)")