Skip to content

Instantly share code, notes, and snippets.

@darrensapalo
Last active September 23, 2021 03:03
Show Gist options
  • Save darrensapalo/632fd025accedbea726d9f062d47d622 to your computer and use it in GitHub Desktop.
Save darrensapalo/632fd025accedbea726d9f062d47d622 to your computer and use it in GitHub Desktop.
Fix gdocs, gfix, gci, gref to have emoji after the colon

Using https://github.com/gazorby/fish-git-emojis , to fix your fisher gci gdocs or gfix commands so that the emoji is after the colon (for conventional commits format), edit this file:

~/.config/fish/functions/_gc.fish

You want the switch case to look like this:

    switch (count $argv)
        case '4'
            set cmd git commit -m "\"$argv[2]($argv[3])$breaking: $argv[1] $argv[4..-1]\"" $footers
        case '3'
            set cmd git commit -m "\"$argv[2]$breaking: $argv[1] $argv[3..-1]\"" $footers
        case '*'
            set cmd git commit -m "$argv"
    end

Double check that the argv1 is after the colon (see line 23, line 21).

Then, run

source ~/.config/fish/functions/_gc.fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment