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

ScriptDescriptionAuthor
ggit helper for lazy typists@Hefeweizen
middleSnips lines out of the the middle of a file and dumps them to stdout@Hefeweizen
vagrant_box_updateupdate installed vagrant boxes@Hefeweizen
git wipcapture 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 git commands
  • 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

  1. cd ~/.oh-my-zsh/custom/plugins
  2. git clone git@github.com:CoffeeOps/commandline-fu.git commandlinefu
  3. Add tumult to your plugin list - edit ~/.zshrc and change plugins=(...) to plugins=(... 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.