ALIAS(1)
β¨ ALIAS(1) β¨
okay so this is the manual page for alias, and it's a fish-shell builtin bestie π
fyi the full name up top is ALIAS(1), fish-shell, and we're so glad you're here π«Ά
πΈ NAME πΈ
alias β literally just creates a function, that's the whole vibe β¨
π SYNOPSIS π
alias
alias [--save] NAME DEFINITION
alias [--save] NAME=DEFINITION
π DESCRIPTION π
NOTE: this page documents the fish builtinalias. if you wanna see the docs for any non-fish versions, runcommand man aliasπ
so alias is a simple little wrapper around the function builtin, and what it does is create a function that wraps a command. it's got similar syntax to the POSIX shell alias. for anything else, the recommendation is to just define a function <> instead, iykyk π
and if what you actually want is to make your interactive life easier and save some typing, consider using an abbreviation <> instead β that's the move fr fr β
fish marks functions that were created by alias by including the command used to create them in the function description. you can list all your alias-created functions by running alias with no arguments at all π they have to be erased using functions -e.
- NAME β the name of the alias
- DEFINITION β the actual command to execute.
aliasautomatically appends$argv, so that all the parameters you use with the alias get passed along to the actual command. lowkey magic β¨
you cannot create an alias to a function with the same name. and note that spaces need to be escaped in the call to alias just like at the command line β even inside quoted parts. yes, even then π
the following options are available, bestie π
-h,--helpβ displays help about using this command π«Ά-s,--saveβ saves the function created by the alias into your fish configuration directory usingfuncsave<> πΎ
π¦ EXAMPLE π¦
the following code will create rmi, which runs rm with additional arguments on every invocation. iconic behaviour honestly π
alias rmi="rm -i"
# This is equivalent to entering the following function:
function rmi --wraps rm --description 'alias rmi=rm -i'
rm -i $argv
end
alias sometimes requires escaping, as you can see here π«
# This needs to have the spaces escaped or "Chrome.app..."
# will be seen as an argument to "/Applications/Google":
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
π SEE MORE π
- the
function<> command this builds on. - Functions <#syntax-function>.
- Defining aliases <#syntax-aliases>.
π Copyright π
fish-shell developers ππ
and that's the whole page! this was version 4.9, dated Sep 08, 2026 β mwah, slay, go make some aliases bestie π β¨π
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms