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 […]
Tag Archives: zsh
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, […]
zsh alias to make and apply patch with git diff
I keep having to look up [patching with git diff](http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html) to remember the syntax whenever I want to create and apply a patch file. Solution? Create an alias for it. It only uses one file, /tmp/patchfile, so don’t try to manage multiple patches with this (maybe I’ll make more intelligent/sophisticated someday. In my .zlogin, I […]
Call up JIRA tasks from zsh using .oh-my-zsh
This was called to my attention via Didn't realize that @ohmyzsh came with a Jira plugin for opening a browser for the issue. #timesaver — Ray Pierce (@pierceray) May 5, 2014 [Current instructions are in the plugin source](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/jira/jira.plugin.zsh) The setup: In .zshrc, add jira to plugins and JIRA_RAPID_BOARD=true if you use Rapid Board. # # […]