sebastiancarlos

@sebastiancarlos@lemmy.sdf.org

This profile is from a federated server and may be incomplete. Browse more on the original instance.

[Question] Which shell prompt do you use and why?

Hi. I’ve been using powerlevel10k for a long time, but a few days ago, I decided I wanted to customize it a bit. I opened the .p10k.zsh file, and I was shocked. It’s really massive, with TONS of options. I’ve been digging through for a few hours already, and it’s absolutely amazing how much you can customize it without...

sebastiancarlos,

https://lemmy.sdf.org/pictrs/image/938229ad-4c04-413b-b2ae-18925e5b0e6e.png

.bashrc:


<span style="color:#323232;"># Prompt
</span><span style="color:#323232;"># "Make it simple, just the dollar sign"
</span><span style="color:#323232;"># "Say no more, fam"
</span><span style="color:#323232;"># - if error code is not 0, then prepend [N] where N is the error code
</span><span style="color:#323232;"># - if user is root, use red and #
</span><span style="color:#323232;">blue='e[34m'
</span><span style="color:#323232;">red='e[31m'
</span><span style="color:#323232;">bold='e[1m'
</span><span style="color:#323232;">reset='e[0m'
</span><span style="color:#323232;">PS1='$( status=$?; [ $status -ne 0 ] &amp;&amp; echo "[$status] ")['"$blue""$bold"']$['"$reset"'] '
</span><span style="color:#323232;">
</span><span style="color:#323232;">if [[ $EUID -eq 0 ]]; then
</span><span style="color:#323232;">  PS1='$( status=$?; [ $status -ne 0 ] &amp;&amp; echo "[$status] ")['"$red""$bold"']#['"$reset"'] '
</span><span style="color:#323232;">fi
</span>

.inputrc:


<span style="color:#323232;"># vi mode, change to 'emacs' here if you prefer
</span><span style="color:#323232;">set editing-mode vi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># vi INSERT prompt
</span><span style="color:#323232;">set vi-ins-mode-string "1e[30;44m2 INS 1e[0m2 "
</span><span style="color:#323232;">
</span><span style="color:#323232;"># vi NORMAL prompt
</span><span style="color:#323232;">set vi-cmd-mode-string "1e[30;47m2 NOR 1e[0m2 "
</span>
sebastiancarlos,

Yes! I use it all the time. No idea why it’s not more popular

sebastiancarlos,

Both are incomplete, but the article is no longer paywalled

sebastiancarlos,

You also don’t need the dash for the short options.

True, but I refuse to entertain such a non-standard option format. It’s already enough to tolerate find’s.

sebastiancarlos,

It’s also traditional to eat raw meat, but we discovered fire at some point.

sebastiancarlos,

Thanks! I guess yas-bdsm is more of a minimal, “bring your own compiler” project. You end up with a folder for your dotfiles, and it’s up to you to decide how to put stuff there.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • normalnudes
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • osvaldo12
  • ngwrru68w68
  • ethstaker
  • JUstTest
  • everett
  • Durango
  • Leos
  • cubers
  • mdbf
  • khanakhh
  • tester
  • modclub
  • cisconetworking
  • anitta
  • tacticalgear
  • provamag3
  • lostlight
  • All magazines