EXPORT(1)

πŸ’… EXPORT(1) β€” fish-shell

okay so bestie, buckle in, because this one's a whole thing and it's literally from the fish-shell manual, page EXPORT(1). no cap. 🐟✨


🌸 NAME 🌸

export β€” the compatibility function for exporting variables πŸŽ€

✨ SYNOPSIS ✨

export
export NAME=VALUE

πŸ’– DESCRIPTION πŸ’–

export is a function that's included purely for compatibility with POSIX shells β€” it's the friendly little bridge for when you're coming from bash-land. but like, in general? the set <> builtin should be used instead. that's the main character here, export is just the guest star. πŸ‘‘

So when you call export with no arguments, it prints out a list of all the currently-exported variables β€” exactly like set -x does. cute little lineup. πŸ“‹

When you call it with a NAME=VALUE pair, the variable NAME gets set to VALUE in the global scope, and it's exported as an environment variable so all your other commands can see it. sharing is caring fr fr 🫢

and options? there are no options available. none. zero. that's it. πŸ’€

πŸ¦‹ EXAMPLE πŸ¦‹

The following commands have an identical effect β€” like, literally the same outcome:

set -gx PAGER bat
export PAGER=bat
⚠️ Note: if you wanna add to something like $PATH, you need to be careful to combine the list <#cartesian-product>. quote it, like so:
export PATH="$PATH:/opt/bin"

Or just use set, which avoids this whole situation entirely, no drama:

set -gx PATH $PATH /opt/bin

⭐ SEE MORE ⭐

  1. The set <> command. (go read it, it's iconic, iykyk πŸ‘€)

fish-shell developers πŸ’œ


okay that's the whole page bestie, you ate that πŸ“βœ¨ β€” this was fish-shell 4.9, dated Sep 08, 2026, and that's the vibe check, periodt. πŸ’…πŸŒˆ

πŸ“¦ 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