Are you a zsh user? Do you like to tweak your shell to the maxium in order to gain a bit of time here or there? You might be in the right place her...
For further actions, you may consider blocking this person and/or reporting abuse
But why define functions & shortcuts if there is a great git plugin for zsh? It's built around aliases, the commands are pretty short and mnemonic, and you can just add any flags you want after typing in the command, i.e. ga -u which is git add -u
Sure, aliases and plugins work as well, if not better.
I just wanted to show how to handle keybindings in zsh here. Git was just an example. Keybindings come in handy for more terminal-based commands imo. Like clearing the screen (which is often bound to
ctrl-l
) and stuff alike.Fair enough, I misunderstood the topic I guess
I am sharing some of my zsh widgets:
in my "autoloaded" folder I also have this function:
The keybinding to open it automatically is:
bindkey -s '^o' 'vif^M'
, so it will run when I press Ctrl-o.Some useful aliases:
I have started using zsh about a couple of weeks ago. I was searching for a dark-theme friendly shell and features like this one.
I can't wait for the post with the "how to pass arguments" example!
Thanks for the time you took on writing this post.
I am happy to hear it is of use for you. Part 2 is now online.
Nice and very useful. Thank you for posting this.