DEV Community

Discussion on: What is your $PS1?

Collapse
 
fennecdjay profile image
Jérémie Astor
%b%k%s%u%F{%(?.076.196)}${${P9K_CONTENT::="❯"}+}${:-"❯"}%b%k%f%s%u 

But it's automagically set in my .zhsrc.

at the top

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; t>
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

and later on

[ -z "$DISPLAY" ] || source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-th>
Collapse
 
moaxcp profile image
John Mercier

That is nice! I never thought of displaying the powerlevel in PS1. I should try out zsh or maybe fish as well.

Collapse
 
benaryorg profile image
#benaryorg

The reason I switched to zsh a few years back is that zsh's vi-mode can do visual whereas bash couldn't (can't?).
Cut&paste within your command line can be super handy, like when you, once again, forgot that git does parameters BSD style so no options after the argument, and you have to move either arguments or options.