Reputation: 1114
I know fish doesn't remember commands that start with a space
, but if it possible to add a rule which ignores Git commands?
Upvotes: 1
Views: 273
Reputation: 2040
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'
Upvotes: 5
Reputation: 246807
Here's a nuclear option, but it might be your best option:
function git
command git $argv
set history_items (history --search --prefix git)
for item in $history_items
history --delete $item
end
end
Upvotes: 0