• Notes
  • Articles
  • Followers 28
  • Following 50
  • Remote follow

Nevkontakte
@me@m.nevkontakte.com

Lawful neutral. Definitely not a cat in a hat. Opinions are of Cthulhu. what/why.

Long-form

nevkontakte.com

Chirp

twitter.com/nevkontakte

Code

github.com/nevkontakte

🔑
Nevkontakte's avatar
Nevkontakte
@me@m.nevkontakte.com

A small quality of life tip for when you are tinkering with your dotfiles (shell, in particular):

$ bash --norc --noprofile # bash is everywhere, and disable user configs in case they are in a busted state. Feel free not to do. bash-5.2$ while zsh; do true; done my-fancy-zsh> cd ~git/dotfiles # Try the current config, see if it works. my-fancy-zsh (errror, your git prompt is busted!)> # Oh no! Let's fiddle with .zshrc some more. my-fancy-zsh (errror, your git prompt is busted!)> ^D # Ctrl-D to exit the shell. my-fancy-zsh> # Restarted in a clean state! my-fancy-zsh> cd ~git/dotfiles # Try again. my-fancy-zsh (omg, something is not checked in 🙈)> # That's much better! my-fancy-zsh (omg, something is not checked in 🙈)> exit 1 # We are done here. bash-5.2$ ^D

This works much better than source ~/.zshrc because not everything in the rc file is idempotent and broken state from a bad attempt can mess with things. It spares me a lot of frustration of opening and closing terminal tabs, which is what computers are supposed to do for us.

#dotfiles #shell

  • permalink
  • interact from your instance
  • 6 days ago
Powered by microblog.pub 2.0.0+dev and the ActivityPub protocol. Admin.