Tag: zsh

  • Making Your zsh Return You to a Non-Production Setting

    I have my prompt in zsh setup to display what Kubernetes context I am pointing to, so that I will notice if I’m somehow pointed at production environments, but I’m still wary of being asked to check things in production and then forgetting to point back to a “safe” environment before doing something else. So…

  • Open Your Github Repo in a Web Browser from the Shell

    This assumes that your first remote is a github remote. Put the following in the appropriate bash or zsh initialization script and that you’re on a Mac. You might need to change “open” to whatever will launch a URL in a web browser on a different *nix system. function gitweb() { git remote -v |…

  • .zlogin (or .zshrc) parse error near `\n’

    This code was at the end of my .zlogin on my mac and was causing .zlogin:152: parse error near `\n’. The problem is rather bone-headed, but I went through trying to :set ff=unix, :set ff=mac in vim to try and remedy bad line endings. function notify_preexec() { # Note the date when the command started,…