Specifications

68 Version 2.0
3.9 Nesting the Shell
The UEFI Shell supports nested shell execution. The UEFI Shell can run the shell from
within itself. The maximum nesting level is determined by how much memory the
system has. The command exit can be used to exit the current shell instance. If the
current shell is a child shell, it will return to the parent shell. Newly launched shell will
have a brand new execution environment except for environment variables and
aliases.
3.10 Interactive Features
Even though the shell design specification primarily discusses aspects of the shell that
can run without user interaction, there are some features described which can
augment the experience of users that are actively interacting with the console.
3.10.1 Key History Support
The UEFI Shell will save commands history that executed from the shell prompt. User
can press up-arrow key and down-arrow key to browse the previous commands.
Commands that were executed in script will not be saved in the key history.
3.10.2 Execution Interrupt Support
The UEFI Shell supports the capability of interrupting the execution of the shell
commands and scripts.
There are two kinds of the execution interrupt: script execution interrupt and internal
command execution interrupt.
Script Execution Interrupt.
The user can press CTRL-C to interrupt the execution of the script. The
interrupt can only happen between commands in a script. The script
supports the nesting of scripts. Once a script is interrupted, all its
predecessor scripts are also interrupted.
Shell Command Execution Interrupt.
The user can press the CTRL-C key sequence to interrupt the execution of
some time-consuming UEFI Shell commands (i.e. ls –r). The UEFI Shell
detects this key sequence and signals the ExecutionBreak member of the
EFI_SHELL_PROTOCOL. Individual UEFI Shell commands check the state of
ExecutionBreak as often as practical and return the SHELL_ABORTED error
code.
The UEFI Shell may not support asynchronous execution interrupt for commands or
applications.