EVAL(1)

πŸ’… EVAL(1) β€” the fish-shell girlies' guide ✨

okay so real talk, this is eval from fish-shell, and bestie, she's a whole vibe. let me tell you everything, no gatekeeping πŸ’–


🌸 NAME 🌸

eval β€” evaluate the specified commands. that's it. that's the whole mood. ✨


πŸŽ€ SYNOPSIS πŸŽ€

eval [COMMANDS ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: eval takes the parameters you give it and evaluates them as a command. like, it actually runs them. main character energy fr fr πŸ’…

and if you pass more than one parameter? no worries, she's not gonna get confused β€” all the parameters get joined together using a space character as a separator. so eval a b c is lowkey just a b c joined with spaces. slay. 🌈

πŸ’‘ little side note bestie: if the command you're evaluating does not need access to stdin, consider using source instead. she's the better fit in that case, iykyk 🫢

and also β€” if you don't need any piping or other compound shell constructs, there's another option: variable-expansion-as-command. it looks like this:

set cmd ls -la; $cmd

yep, that's it. no eval needed. iconic behavior honestly πŸ‘‘


πŸ“ EXAMPLE πŸ“

okay so this example is genuinely so cute β€” it calls the ls command and then truncates each filename to the first 12 characters. the way that works is honestly so satisfying 😭✨

set cmd ls \| cut -c 1-12
eval $cmd

like, eval looks at $cmd, expands it, and runs the whole pipeline. chef's kiss. πŸ”₯


fish-shell developers β€” protecting the whole squad since forever πŸ’œ


🧚 and that's the page, bestie!! this was EVAL(1) from fish-shell, version 4.9, dated Sep 08, 2026. go forth and evaluate responsibly, mwah πŸ’‹βœ¨πŸŽ€
πŸ“¦ 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