Commit Graph

66 Commits

Author SHA1 Message Date
9d8d8901d7 Add array support for local/export/readonly builtins
Add array length syntax ${arr[#]}

Map read path now expands variables before splitting on ., fixing map "$node" with dotted paths

Map assignment path uses quote-aware token splitting, enabling quoted keys like "--type="

Completion errors now display above prompt instead of being overwritten

Fix nested if/fi parser bug when closing keywords appear on separate lines

Add QuoteState enum, replacing ad-hoc quote tracking booleans across lexer, highlighter, and expansion

Add split_tk_at/split_tk for quote-aware token splitting with span preservation

Refactor setup_builtin to accept optional argv for deferred expansion

Add ariadne dependency (not yet wired up)
2026-02-28 15:54:53 -05:00
4cda68e635 Stuff stored in maps can be eval'd on access by storing with the -F flag 2026-02-28 01:41:16 -05:00
f0a000343b double bracket tests now do regex on '==' between two strings
fixed line wrapping causing weird cursor issues
2026-02-27 21:25:01 -05:00
0c40f17b60 added 'map', 'pop', 'push', 'fpop', 'fpush', and 'rotate' builtins 2026-02-27 20:37:58 -05:00
076c94df3c Added alias (-a) and signal (-S) flags for 'complete' and 'compgen' 2026-02-27 13:10:24 -05:00
6f408b3c21 ran clippy fix 2026-02-27 11:05:08 -05:00
3d47e4edd9 Added -j flag to 'complete' for completing job names/pids 2026-02-27 11:03:56 -05:00
a581f5161f shopt now prints current values if no args are given 2026-02-27 10:07:45 -05:00
105cf7c275 Implemented -o opt for complete/compgen builtins
Completion candidates now come with a space by default, unless it's a directory
2026-02-27 09:44:33 -05:00
edc29595b8 Fixed regressions in completion system caused by previous commit
Removed a lot of old debug logs
2026-02-27 01:34:43 -05:00
96ea2d0ac9 Early implementation of bash-like completions with 'complete' and 'compgen' builtins 2026-02-27 01:10:52 -05:00
f9312885bd Implemented arrays and array indexing 2026-02-26 00:32:54 -05:00
e7e9bfbcb6 Extracted readline from the dead prompt module 2026-02-25 20:00:19 -05:00
22adbce9e4 Various line editor fixes and optimizations 2026-02-25 15:43:08 -05:00
03a435c03f implemented builtins: readonly, unset, true, false, and : (no-op) 2026-02-24 17:57:09 -05:00
f1ecec88bd flow control keywords are now highlighted purple 2026-02-24 16:22:59 -05:00
622e9f4a1e Refactored internals for builtins inside of pipelines 2026-02-24 10:54:24 -05:00
cab7a0fea7 Ran the codebase through rustfmt 2026-02-23 23:32:46 -05:00
aed0e6fb8c - fixed 'I' command in normal mode not moving to exact start of line
- Added disown builtin
- Fixed job table not hanging up child processes on exit
- Added target architecture and os to --version output
- Added local builtin for creating variables scoped to functions
2026-02-23 16:10:49 -05:00
88c0945e47 Implemented the exec builtin
Fixed readline and terminal interactions using stdin instead of /dev/tty
2026-02-20 12:17:48 -05:00
9b8c8d704b implemented the pushd, popd, and dirs builtins 2026-02-20 01:29:40 -05:00
74988166f0 command arguments are now underlined if they match an existing path -m ran rustfmt on the entire codebase 2026-02-19 21:32:03 -05:00
1d4c177c64 handled some unwraps in cd
error reporting now blames the function call span instead of the errored command inside the function
2026-02-19 18:27:51 -05:00
744693a89d implemented the trap builtin 2026-02-19 16:39:18 -05:00
7d0614943c Tab completion has been implemented
more small highlighter tune ups

2>&1 style redirections now work properly
2026-02-18 21:53:36 -05:00
8068b43146 Implemented syntax highlighting 2026-02-18 02:00:45 -05:00
0575616ac2 properly implemented read builtin
fixed bugs related to redirections and compound commands

improved io routing logic
2026-02-17 17:30:21 -05:00
222e06bee6 Added prompt escape code expansion flag to echo, -p
Added non-formatted runtime to prompt escape codes

Added prompt escape code that expands to the output of a shell function

Reworked internal logic for termios control
2026-01-29 03:46:35 -05:00
4a6a941f1e Fixed logic for EINTR propagation 2026-01-28 20:48:29 -05:00
ae3c9a0445 Implemented proper variable scoping
Extracted business logic out of signal handler functions

Consolidated state variables into a single struct

Implemented var types
2026-01-28 19:30:48 -05:00
5aead4fcdc Added rustfmt.toml, formatted codebase 2025-08-12 13:58:25 -04:00
ded3f02cf6 removed placeholder text in prompt
cd no longer panics if the given directory doesn't exist (wtf?)
2025-05-29 01:29:25 -04:00
ec179a04be Added regex to [[ ]] tests 2025-05-13 00:48:19 -04:00
c8be5205e9 implemented the 'builtin' and 'command' builtins 2025-05-08 21:21:23 -04:00
11353b2d69 implemented for loops 2025-04-20 05:16:50 -04:00
ed05e34379 Implemented subshells and improved error handling 2025-03-29 22:16:26 -04:00
dd1a9a93b2 added the ability to export existing variables 2025-03-27 01:35:56 -04:00
b0cef5e06b Improved error reporting and fully implemented the shopt command 2025-03-26 23:41:19 -04:00
0be4de0ffe Implemented flags and extra safety for zoltraak 2025-03-24 20:25:38 -04:00
9ace3a177d Implemented a new builtin and improved error handling 2025-03-24 17:53:32 -04:00
29cd4a69b6 Cleaned up warnings 2025-03-23 17:41:12 -04:00
7f8f5644df switched to Arc instead of Rc for input strings 2025-03-23 17:37:15 -04:00
e3f3e3dcdc Implemented an abstraction for extracting flags from builtins 2025-03-22 20:10:47 -04:00
b6a9bb880d Implemented command substitution 2025-03-19 16:46:45 -04:00
3b0e576d29 added another test for the parser 2025-03-19 15:16:43 -04:00
653a5fe344 Re-implemented aliases 2025-03-18 21:50:53 -04:00
62c76e70a6 Implemented prompt expansion, and display for errors 2025-03-18 15:54:06 -04:00
182182cacb Implemented logic for loops and if statements 2025-03-16 14:28:49 -04:00
48236398f5 Early work on scripting features 2025-03-16 02:56:29 -04:00
8699fc408b Re-implemented more job control logic 2025-03-16 00:16:33 -04:00