Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

they're just functions so they end up in files in ~/.config/fish/functions/

  $ alias foo bar

  $ function foo --wraps bar --description 'alias foo=bar'
    bar $argv
  end
these two are basically equivalent. you'll need to

  $ funcsave foo
to make it persist. this will write foo.fish into that functions folder.

there's also abbreviations like

  $ abbr --add ll ls -lh
which expand as you type. ll won't end up in your history because it's expanded before that.


Abbreviations are actually brilliant! So much better than aliases. Long live fish.


One of my favorite features. I counted then recently - over 100.

The killer feature over aliases is that a) you can edit them and b) you can define them instantaneously.

Did you type `git diff --cached` one time to many? Up arrow -> Ctrl+a -> "abbr gdc " <enter>

Bam. `gdc<space|enter>` now expands to that. It's there forever. And that's how you end up with 100+ abbreviations.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: