Search code examples
fish

fishshell alias without replacing command


I am having a trial of fishshell, currently using zsh

When I set an alias in fishshell config, e.g.

alias aa="abc -d -e -f"

Fishshell replaces the command with the actual command while I am typing the command. It is possibile to config it to work seamlessly without replacing the command?


Solution

  • What you're describing is abbreviations, not aliases. Abbreviations are commands that expand as you type them.

    Running a command like you described:

    alias aa="abc -d -e -f"
    

    will indeed set an alias that will not expand in-line.