diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 10:48:02 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 10:48:02 +1200 |
commit | 044cd5905878fc6d2678f646685bc055d0b386e5 (patch) | |
tree | a6868b452948b30f0c18efbfd62114224b4490fe /sh | |
parent | Experiment with abbreviated prompt (diff) | |
download | dotfiles-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')
-rw-r--r-- | sh/shrc.d/prompt.sh | 2 |
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)") |