Commit graph

12 commits

Author SHA1 Message Date
527199c23d Code Cleanup + Ctrl+D fix + Ctrl+L clears screen
- Removed some code duplication
- Ctrl+D is fixed and now works as it should (exit if user didn't
write anything, ignore otherwise)
- Ctrl+L clears the terminal screen
2026-04-21 15:43:51 +02:00
ca08c9e3e5 Fixed incorrect cursor position if prompt contains ANSI sequences
- And added delete key handling
2026-04-21 15:05:17 +02:00
1101c53bf6 Improved readline function to support <- and ->
- readline function now uses raw terminal input mode (if in
interactive session)
- readline function supports cursor movement to the left and to the
right and inline editing (also unicode support)
2026-04-21 14:44:05 +02:00
17501b59b4 Redirrect support for >, >>, <, &>, 2>
- cd does less work now
2026-04-21 02:51:59 +02:00
db5aef12c2 PS1 variable support, ~ expansion and pretty pwd
- if arsh has a PS1 env var, it will use it to display prompt. It
supports esc sequences, \u, \w
- if '~' is used, it will be expanded to $HOME env var value
- if PS1 env var uses \w, and $PWD is somewhere inside $HOME, then it
will show '~' in prompt instead of a long path
- arsh sets $SHELL env var on startup
2026-04-21 01:36:40 +02:00
3e1f2a2340 Updated README 2026-02-20 01:40:30 +01:00
2a908210a1 Added spawn with commands. ex. "arsh -c 'rm -rf /'"
and fixed a spelling mistake
2026-02-20 01:32:15 +01:00
1de31ff6a5 Changed the parsing method
This was made with help from ChatGPT :(
2026-02-20 01:31:36 +01:00
86ecaef72d Pipes '|' support
- cd without arguments moves to $HOME
- updated README
2026-02-19 21:02:40 +01:00
afbcaac1ae Script files support
- readline accepts stream to read from
- fixed issues with EOF
- arsh can be called with a file path as a second parameter, that will
be interpreted
2026-02-19 17:49:56 +01:00
e96ae4b4a2 Switched from GNU Readline to custom Readline function
to make arsh more compatible with other Unix-Like systems

- Fixed small memory leak
2026-02-19 16:13:34 +01:00
7bbfb75566 basic shell 2026-02-19 14:22:07 +01:00