I know fish doesn't remember commands that start with a space
, but if it possible to add a rule which ignores Git commands?
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'