1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-05 01:01:30 +01:00

zsh: fix tab formatting for zsh-theme

This commit is contained in:
bretello 2021-03-13 14:50:57 +01:00
parent 74add58517
commit 0c3b712463

View File

@ -6,32 +6,32 @@
# See the prompt expansion section in `info zsh` for more info # See the prompt expansion section in `info zsh` for more info
function user_prompt(){ function user_prompt(){
# prints info about username/hostname # prints info about username/hostname
# for ssh connections # for ssh connections
local p local p
local host local host
if [[ $UID -eq 0 ]]; then if [[ $UID -eq 0 ]]; then
# root # root
echo -n "%F{255}[%f" # open square bracket echo -n "%F{255}[%f" # open square bracket
echo -n "%K{160}%F{255}%Broot%b%k%f" echo -n "%K{160}%F{255}%Broot%b%k%f"
if [[ $SSH_CONNECTION ]]; then if [[ $SSH_CONNECTION ]]; then
# add the white @ # add the white @
# echo -n '%F{255} at %f' # echo -n '%F{255} at %f'
echo -n "%F{255}@%f" echo -n "%F{255}@%f"
fi fi
fi fi
if [[ $SSH_CONNECTION ]]; then if [[ $SSH_CONNECTION ]]; then
if [[ $UID -ne 0 ]]; then if [[ $UID -ne 0 ]]; then
echo -n "%F{255}[%f" # open square bracket echo -n "%F{255}[%f" # open square bracket
fi fi
# underlined orange hostname (%m) # underlined orange hostname (%m)
echo -n "%K{202}%B%F{255}%m%f%k%b" echo -n "%K{202}%B%F{255}%m%f%k%b"
if [[ $UID -ne 0 ]]; then if [[ $UID -ne 0 ]]; then
echo -n "%F{255}]%f" # close square bracket echo -n "%F{255}]%f" # close square bracket
fi fi
fi fi
# close square bracket # close square bracket
if [[ $UID -eq 0 ]]; then echo "%F{255}]%f"; fi if [[ $UID -eq 0 ]]; then echo "%F{255}]%f"; fi
} }
function job_prompt() { function job_prompt() {