summaryrefslogtreecommitdiff
path: root/Userland/Shell/Shell.h
AgeCommit message (Collapse)Author
2021-05-24LibLine+Shell: Allow some programs to modify the current termiosAli Mohammad Pur
This setting can be controlled by setting the PROGRAMS_ALLOWED_TO_MODIFY_DEFAULT_TERMIOS _local_ shell variable to a list containing such programs.
2021-05-11Shell: Add an option to autosave history every N msAli Mohammad Pur
...and set it to 10 seconds by default.
2021-05-10Shell: Make escaping more intelligentAli Mohammad Pur
Instead of the previous only-escape-with-backslashes, extend the escaping to one of: - No escape - Escape with backslash - Escape with "\xhh" if control character that isn't easily represented as \X - Escape with "\uhhhhhhhh" if unicode character that is too big to represent as "\xhh". Fixes #6986.
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-23Shell: Add a 'kill' builtin that wraps the system's ownAli Mohammad Pur
Fixes #6578.
2021-04-23Shell: Add support for jobspecs in fg/bg/disown/waitAli Mohammad Pur
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-20Shell: Auto-completion shouldn't suggest non-executable files for the ↵Gunnar Beutner
program name
2021-04-13Shell: add `type` builtinjacob gw
2021-03-22Shell: Add support for indexing into variablesAnotherTest
Now a variable may have an optional slice (only _one_ slice), which can also use negative indices to index from the end. This works on both lists and strings. The contents of the slice have the same semantics as brace expansions. For example: ```sh $ x=(1 2 3 4 5 6) $ echo $x[1..3] # select indices 1, 2, 3 2 3 4 $ echo $x[3,4,1,0] # select indices 3, 4, 1, 0 (in that order) 4 5 2 1 $ x="Well Hello Friends!" $ echo $x[5..9] Hello ```
2021-03-07Shell: Add support for 'immediate' expressions as variable substitutionsAnotherTest
This commit adds a few basic variable substitution operations: - length Find the length of a string or a list - length_across Find the lengths of things inside a list - remove_{suffix,prefix} Remove a suffix or a prefix from all the passed values - regex_replace Replace all matches of a given regex with a given template - split Split the given string with the given delimiter (or to its code points if the delimiter is empty) - concat_lists concatenates any given lists into one Closes #4316 (the ancient version of this same feature)
2021-03-07Shell: Do not parse history events in scriptsAnotherTest
That makes no sense!
2021-03-07Shell: Skip caching PATH and history load/save when not interactiveAnotherTest
Non-interactive shells (i.e. when running scripts) do not need this functionality, so they are a boatload of wasted time. This significantly reduces the script startup and shutdown times when there are lots of executables in PATH or lots of entries in the history.
2021-01-19Shell: Add a `not` builtinAnotherTest
`not` just takes a command, runs it, then negates its exit code (0->1, non-zero->0).
2021-01-19Shell: Consider numbers as word characters tooAnotherTest
Otherwise `foobar2` wouldn't be a valid identifier
2021-01-19Shell: Add a builtin that parses its sole argument and dumps its ASTAnotherTest
Pretty useful for debugging.
2021-01-15Shell: Add (basic) support for history event designatorsAnotherTest
Closes #4888
2021-01-12Shell: Move to Userland/Shell/Andreas Kling