Define an alias in fish shell

Just use alias. Here’s a basic example:

# Define alias in shell
alias rmi "rm -i"

# Define alias in config file ( `~/.config/fish/config.fish` )
alias rmi="rm -i"

# This is equivalent to entering the following function:
function rmi
    rm -i $argv
end

# Then, to save it across terminal sessions:
funcsave rmi

This last command creates the file ~/.config/fish/functions/rmi.fish.

Interested people might like to find out more about fish aliases in the official manual.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)