Search code examples
gitshellfish

In Fish, is it possible to ignore all Git related commands?


I know fish doesn't remember commands that start with a space, but if it possible to add a rule which ignores Git commands?


Solution

  • Inspired by mnagle's answer, but with fish-specific features:

    If you add an abbreviation for git to "git", then fish will insert a space before every git command for you!

    abbr -a git ' git'