dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit 992aa9855fc60b7e745f4dfa25a2b3a07588df68
parent 9e06fa74ede9244c11e8f3b900344e6a7b583a70
Author: Chris Noxz <chris@noxz.tech>
Date:   Mon, 21 Oct 2019 19:23:21 +0200

[ksh] I know who I am...

Diffstat:
Mksh/.kshrc.d/90-prompt.sh | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/ksh/.kshrc.d/90-prompt.sh b/ksh/.kshrc.d/90-prompt.sh @@ -1,12 +1,22 @@ #!/bin/ksh -export PS1="$(printf '[xxx] %s\[%s\]\\u\[%s\] \\w%s \$ ' \ +export PS1="$(printf '[xxx]%s\[%s\]%s\[%s\] \\w%s \$ ' \ '$(_ksh_set_title)' \ '$(tput bold)' \ '$(tput sgr0)' \ + '$(_ksh_user_prompt)' \ '$(_ksh_git_prompt)' \ )" +_ksh_user_prompt() { + + # abort if me + [ $(id -u) == 1000 ] && return + + # print username + printf ' %s' "$(id -un)" +} + _ksh_git_prompt() { # abort if not a git repository