-
Notifications
You must be signed in to change notification settings - Fork 1
A command shell
License
katef/qs
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Responsibilities: - Process management - Setting up pipes and redirections - Signal handling (for instance interrupting a running program) - Variables - Control flow, with structured and procedural constructs (functions, loops, conditionals and so on) - Tokenisation and operations on the one data type: lists of words Features which are purposefully excluded: - Job control - Prompting - Line editor and command history - Globbing - Arithmetic and similar expression syntax - Environment - Here documents Pre-populated variables: $? command exit status global $_ command value global $$ process ID global $# argc per call $* argv per call $^ field separator local $. current block local Scope: Variable names search the local scope first, and then up the tree of parent scopes. If a variable by that name is found in any scope along the way, that is the variable used for assignment or dereferencing. If no such variable was found, assignment then declares the variable in the local scope, and derefrencing is an error. Variables names prefixed with a dot act on local scope only. The dot is not part of the variable name.