From 044cd5905878fc6d2678f646685bc055d0b386e5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 10:48:02 +1200 Subject: Use whoami(1) rather than `id -nu` A little bit clearer, and still POSIX; FreeBSD and OpenBSD seem to both have it --- sh/shrc.d/prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/shrc.d/prompt.sh') 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)") -- cgit v1.2.3