.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "EVAL" "1" "Oct 26, 2026" "4.9" "fish-shell" .SH NAME eval \- evaluate the specified commands .SH SYNOPSIS .nf \fBeval\fP [\fICOMMANDS\fP \&...] .fi .sp .SH DESCRIPTION .sp \fBeval\fP evaluates the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator. .sp If the command does not need access to stdin, consider using source \%<> instead. .sp If no piping or other compound shell constructs are required, variable\-expansion\-as\-command, as in \fBset cmd ls \-la; $cmd\fP, is also an option. .SH EXAMPLE .sp The following code will call the ls command and truncate each filename to the first 12 characters. .INDENT 0.0 .INDENT 3.5 .sp .EX set cmd ls \e| cut \-c 1\-12 eval $cmd .EE .UNINDENT .UNINDENT .SH Copyright fish-shell developers .\" End of generated man page.