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 builtin alias. if you wanna see the docs for any non-fish versions, run command 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. alias automatically 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 using funcsave <> πŸ’Ύ

πŸ¦‹ 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 πŸ’€

  1. the function <> command this builds on.
  2. Functions <#syntax-function>.
  3. Defining aliases <#syntax-aliases>.

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