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 tostdin, consider usingsourceinstead. 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. π₯
π Copyright π
fish-shell developers β protecting the whole squad since forever π
π§ and that's the page, bestie!! this wasEVAL(1)from fish-shell, version4.9, datedSep 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