Fish (Unix shell): Difference between revisions

Content deleted Content added
m No implicit subshell: Change subshell link from disambiguation page to direct link to child process
Line 94:
 
=== No implicit subshell ===
Some language constructs, like [[pipeline (software)|pipelines]], [[subroutine|functions]] and [[control flow#Loops|loops]], have been implemented using so called [[SubshellChild process|subshells]] in other [[shell (computing)|shell]] languages. Subshells are child programs that run a few commands for the shell and then exit. This implementation detail typically has the side effect that any state changes made in the subshell, such as variable assignments, do not propagate to the main shell. Fish never forks off so-called subshells; all [[Shell_builtin|builtins]] are always fully functional.
<syntaxhighlight lang="fish">
# This will not work in many other shells, since the 'read' builtin