summaryrefslogtreecommitdiff
path: root/usr.bin/osh
AgeCommit message (Collapse)Author
31 hoursusr.bin: osh: Clear argv after script commandIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
32 hoursusr.bin: osh: Add commentsIan Moffett
Introduce comments for the OSH interpreter. Comments are denoted by '@' and are ignored by OSH. Signed-off-by: Ian Moffett <ian@osmora.org>
32 hoursusr.bin: osh: Skip blank newlines in scriptsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
33 hoursusr.bin: osh: Implement shell script parsingIan Moffett
Previously, OSH was only capable of interpreting commands that came directly from the console. This commit allows calling /usr/bin/osh while passing a path to a script to be parsed and interpreted. This commit additionally adds a `command_match()` routine to simplify the matching of commands. On top of this, cmd_run() now also takes a `wait` argument that allows the caller to specify whether not to daemonize the spawned process or wait on its execution to finish. Signed-off-by: Ian Moffett <ian@osmora.org>
4 daysusr: usr.bin/time -> usr.bin/dateIan Moffett
Change the 'time' binary to be called 'date' as it is more fitting for the type of program it is. Signed-off-by: Ian Moffett <ian@osmora.org>
12 daysusr.bin: osh: Add builtin 'clear' commandIan Moffett
- Clear the screen with the "\033[H" ANSI escape sequence - Add clear command to the builtin command list Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayskernel: spawn: Add argv + stub envp argumentsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09usr.bin: osh: Check bin_path with access()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09usr.bin: osh: Seperate builtin cmds from user cmdsIan Moffett
- Remove 'path' field from command structure - Rename 'command' structure to 'builtin_cmd' - Attempt to run as builtin command first and fallback to /usr/bin/* on failure Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09usr.bin: osh: Make internal routines staticIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-08usr.bin: Add 'time' command to return current timeIan Moffett
- Add usr.bin/time/ program to read RTC - Add 'time' command to osh Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-07usr.bin: Use stdio for console accessQuinn Stephens
Modified fetch, kmsg, and osh to use stdio.h routines instead of just raw file descriptors. Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-06usr.bin: osh: Add backspace bellIan Moffett
Add optional bell that beeps when no more characters can be backspaced. This may be turned off by entering `bell off' Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-04usr.bin: kfgwm: Add initial WM sourcesIan Moffett
- Add basic structures and defines for describing a window - Add basic window drawing routines - Draw demo/test window Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31usr.bin: Add simple `fetch' programIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31usr.bin: osh: Make kmsg its own programIan Moffett
- Give command table entries a path field to refer to paths of executable files - Make kmsg its own program in /usr/bin/kmsg Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-29usr.bin: osh: Add kmsg command for kernel messagesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19usr: osh: Add "reboot" and "shutdown" commandsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-05usr: osh: Rewrite console shellGon Namprasertkul
This commit makes the shell prototype more flexible Signed-off-by: Gon Namprasertkul <foresterblox@gmail.com> Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-02usr: osh: Use project root in build scriptIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-04-18usr.bin: Add basic "shell"Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>