commandline-fu
June 24, 2023 ยท View on GitHub
Table of Contents
Collected snippets and scripts from the commandline-fu channel on coffeeops slack
Included scripts
| Script | Description | Author |
|---|---|---|
g | git helper for lazy typists | @Hefeweizen |
middle | Snips lines out of the the middle of a file and dumps them to stdout | @Hefeweizen |
vagrant_box_update | update installed vagrant boxes | @Hefeweizen |
git wip | capture in-progress file changes | @Hefeweizen |
git brcl | "branch clean" - rm various copies of a branch (e.g. foo-wip; origin/foo) | @Hefeweizen |
Other Script Collections
- git-extra-commands - Collected extra
gitcommands - tumult - macOS-specific scripts. They're packaged as a ZSH plugin but can easily be used with other shells.
Installing
The commandline-fu collection is packaged as a ZSH plugin to make it easier to use if you're already using a ZSH framework. If you don't already use a framework, I recommend Zgenom, because it is wicked fast and also supports using oh-my-zsh's internal plugins.
Bash / not using a framework
If you're using bash, or aren't using a framework, you can install it by cloning this repository and adding its bin directory to your $PATH.
Antigen
Add antigen bundle unixorn/tumult.plugin.zsh to your .zshrc with your other bundle commands.
Antigen will handle cloning the plugin for you automatically the next time you start zsh. You can also add the plugin to a running ZSH with antigen bundle CoffeeOps/commandline-fu for testing before adding it to your .zshrc.
Oh-My-Zsh
cd ~/.oh-my-zsh/custom/pluginsgit clone git@github.com:CoffeeOps/commandline-fu.git commandlinefu- Add tumult to your plugin list - edit
~/.zshrcand changeplugins=(...)toplugins=(... commandlinefu)
Zgenom
Add zgenom load CoffeeOps/commandline-fu to your .zshrc file in the same function you're doing your other zgenom load calls in. Zgenom will handle automatically cloning the plugin for you the next time you do a zgenom save.