• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for zsh

zsh

Automatically Switch Node Version in Zsh from package.json

Last updated on January 12, 2023 by Sal Ferrarello

Add this code to $HOME/.zshrc to automatically set the node version to match the version in package.json.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: command line, jq, node, nvm, zsh

zsh alias with fallback

Last updated on August 12, 2021 by Sal Ferrarello

In my zsh configuration I define a number of aliases. One particular zsh alias maps gl to my custom Git alias “git lg”. Since my zsh configuration is portable, I want to define a fallback if my custom Git alias does not exist on the machine.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Solution Tagged With: zsh

Add git status to zsh prompt

Last updated on December 29, 2020 by Sal Ferrarello

One of the things that made me much better at Git was making my current branch (and whether or not I have any changed files) always visible. By default zsh includes everything you need to do this, you just need to configure it.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Recommendations, Solution Tagged With: command line, Git, zsh

Add a Blank line at the Beginning of Command Line Prompt

Last updated on October 26, 2020 by Sal Ferrarello

While there are many ways to customization your command line prompt, one that can help readability is adding a blank line at the beginning of each prompt.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Bash, command line, zsh

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in