mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-15 22:51:13 -03:00
We no longer have two doc systems, move sphinx_doc_src back to doc_src
This commit is contained in:
33
doc_src/cmds/eval.rst
Normal file
33
doc_src/cmds/eval.rst
Normal file
@@ -0,0 +1,33 @@
|
||||
.. _cmd-eval:
|
||||
|
||||
eval - evaluate the specified commands
|
||||
======================================
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
eval [COMMANDS...]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
``eval`` 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.
|
||||
|
||||
If your command does not need access to stdin, consider using ``source`` instead.
|
||||
|
||||
If no piping or other compound shell constructs are required, variable-expansion-as-command, as in ``set cmd ls -la; $cmd``, is also an option.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following code will call the ls command and truncate each filename to the first 12 characters.
|
||||
|
||||
::
|
||||
|
||||
set cmd ls \| cut -c 1-12
|
||||
eval $cmd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user