Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-04-12 | Shell: Add `map_fixed` to the pledges for command autocompletion | Tim Schumacher | |
2023-04-09 | Everywhere: Remove unused DeprecatedString includes | Ben Wiederhake | |
2023-03-31 | Shell: Don't require ArgsParser values to be null-terminated | Ali Mohammad Pur | |
2023-03-29 | Shell: Skip rc files when not running interactively | Tim Schumacher | |
This makes debugging a bit nicer. | |||
2023-03-29 | Shell: Correctly mark the end line of a parsed list | Tim Schumacher | |
2023-03-29 | Shell: Allow appending empty string literals | Tim Schumacher | |
Otherwise, we just silently drop arguments that are empty strings. | |||
2023-03-29 | Shell: Properly skip POSIX `Fi` tokens | Tim Schumacher | |
2023-03-29 | Shell: Evaluate the program name before parsing arguments | Tim Schumacher | |
Otherwise, we are too late to catch the "load the POSIX-compatible shellrc" branch. | |||
2023-03-22 | Shell: Implement arithmetic expansions for POSIX mode | Ali Mohammad Pur | |
This also adds a 'math' immediate function that can be used in Shell proper to do arithmetic stuff. | |||
2023-03-22 | Shell: Resolve nonexistent string env variables to the empty string | Ali Mohammad Pur | |
We did this for lists, but not for strings. | |||
2023-03-22 | Shell: Load a different rc file when in POSIX mode | Ali Mohammad Pur | |
2023-03-21 | Everywhere: Use `LibFileSystem` where trivial | Cameron Youell | |
2023-03-15 | LibGfx+Userland: Make TextAttributes::underline_style optional | Sam Atkins | |
Rather than having a style AND a field saying whether to use the style, just make the style Optional. | |||
2023-03-13 | AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted | Tim Schumacher | |
No functional changes. | |||
2023-03-13 | AK: Rename Stream::read_entire_buffer to Stream::read_until_filled | Tim Schumacher | |
No functional changes. | |||
2023-03-10 | Shell: Error out on invalid `export' argument | Ali Mohammad Pur | |
Previously `export =` would crash the shell, make this an error instead. | |||
2023-03-07 | Shell: Fix bogus C-style casts from `NonnullOwnPtr<T>*` to `T*` | Andreas Kling | |
Thanks UBSAN for spotting this! | |||
2023-03-06 | Everywhere: Remove NonnullOwnPtr.h includes | Andreas Kling | |
2023-03-06 | Everywhere: Stop using NonnullOwnPtrVector | Andreas Kling | |
Same as NonnullRefPtrVector: weird semantics, questionable benefits. | |||
2023-03-06 | Everywhere: Remove NonnullRefPtr.h includes | Andreas Kling | |
2023-03-06 | Everywhere: Stop using NonnullRefPtrVector | Andreas Kling | |
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>. | |||
2023-03-01 | LibCore+Everywhere: Remove ArgsParser::add*(char const*&) | Ali Mohammad Pur | |
This is not guaranteed to always work correctly as ArgsParser deals in StringViews and might have a non-properly-null-terminated string as a value. As a bonus, using StringView (and DeprecatedString where necessary) leads to nicer looking code too :^) | |||
2023-02-28 | Everywhere: Use '_{short_,}string' literals more | Linus Groh | |
This mostly updates code what was written before but merged after these were added. | |||
2023-02-28 | Userland+AK: Stop using getopt() for ArgsParser | Ali Mohammad Pur | |
This commit moves the implementation of getopt into AK, and converts its API to understand and use StringView instead of char*. Everything else is caught in the crossfire of making Option::accept_value() take a StringView instead of a char const*. With this, we must now pass a Span<StringView> to ArgsParser::parse(), applications using LibMain are unaffected, but anything not using that or taking its own argc/argv has to construct a Vector<StringView> for this method. | |||
2023-02-28 | Shell: Convert the POSIX parser/lexer to ErrorOr | Ali Mohammad Pur | |
2023-02-28 | Shell: Convert all immediately convertible fallible functions to ErrorOr | Ali Mohammad Pur | |
2023-02-28 | Shell: Convert the remaining fallible AST functions to ErrorOr | Ali Mohammad Pur | |
2023-02-28 | Shell: Make Immediate expression invocation fallible | Ali Mohammad Pur | |
This removes a whole bunch of FIXMEs in the immediate expr implementations as well :^) | |||
2023-02-28 | Shell: Convert builtins to use the modern main() style | Ali Mohammad Pur | |
That is, return ErrorOr<int>, handle fallible ops with TRY() and accept a Main::Arguments. Note that we do not populate the argc/argv members of Main::Arguments, so all accesses have to go through .strings. | |||
2023-02-28 | Shell: Make AST::dump() ErrorOr-aware | Ali Mohammad Pur | |
2023-02-28 | Shell+LibCodeComprehension: Start replacing {Deprecated => }String | Ali Mohammad Pur | |
This starts by switching all AST members to Strings, and dealing with the fallout. | |||
2023-02-21 | Shell: Fix (and paper over) various const-correctness issues | Andreas Kling | |
2023-02-18 | Shell: Correct the out-of-bounds expansion bailing condition | Ali Mohammad Pur | |
Also adds a couple (useful) debug prints which helped track down the problem. | |||
2023-02-18 | Shell: Allow underscores in normal expansion names | Ali Mohammad Pur | |
2023-02-18 | Shell: Correctly keep track of special parameter length | Ali Mohammad Pur | |
We were previously treating special expansions (e.g. $#) as zero-length expansions, which made the shell repeat them literally after expanding them. | |||
2023-02-18 | Shell: Clear expansions after committing a word in the POSIX parser | Ali Mohammad Pur | |
2023-02-18 | Shell: Add support for heredocs to the POSIX parser | Ali Mohammad Pur | |
2023-02-18 | Shell: Add a '--posix' mode to the 'dump' builtin | Ali Mohammad Pur | |
2023-02-18 | Shell: Allow the heredoc node to act as a redirection too | Ali Mohammad Pur | |
This will be used in a future commit to implement POSIX sh heredocs. | |||
2023-02-13 | Everywhere: Use /bin/Shell as the shebang for Shell scripts | Ali Mohammad Pur | |
2023-02-13 | Shell: Use the POSIX parser if run as /bin/sh or passed the --posix flag | Ali Mohammad Pur | |
Note that the default shellrc is most likely not valid posix sh code, so passing --skip-shellrc is suggested until we come up with a separate shellrc file for the POSIX parser to use when interactive. | |||
2023-02-13 | Shell: Start implementing a POSIX-compliant parser | Ali Mohammad Pur | |
The parser is still very much a work-in-progress, but it can currently parse most of the basic bits, the only *completely* unimplemented things in the parser are: - heredocs (io_here) - alias expansion - arithmetic expansion There are a whole suite of bugs, and syntax highlighting is unreliable at best. For now, this is not attached anywhere, a future commit will enable it for /bin/sh or a `Shell --posix` invocation. | |||
2023-02-13 | LibCore: Remove `Stream.h` | Tim Schumacher | |
2023-02-13 | LibCore: Rename `File` to `DeprecatedFile` | Tim Schumacher | |
As usual, this removes many unused includes and moves used includes further down the chain. | |||
2023-01-29 | AK: Move memory streams from `LibCore` | Tim Schumacher | |
2023-01-27 | AK: Remove StringBuilder::build() in favor of to_deprecated_string() | Linus Groh | |
Having an alias function that only wraps another one is silly, and keeping the more obvious name should flush out more uses of deprecated strings. No behavior change. | |||
2023-01-27 | Shell: Replace uses of JsonObject::get_deprecated()/get_ptr() | Sam Atkins | |
2023-01-17 | AK+Everywhere: Rename JsonObject::get() to ::get_deprecated() | Sam Atkins | |
This is a preparatory step to making `get()` return `ErrorOr`. | |||
2023-01-14 | Shell: Use `AllocatingMemoryStream` to search for the IFS | Tim Schumacher | |
2023-01-12 | LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr | Sam Atkins | |
clang-format sure has some interesting opinions about where to put a method call that comes after a lambda. :thonk: |