Skip to main content

Module shell

Module shell 

Source
Expand description

Chevron shell - Minimal interactive kernel shell

Provides a simple interactive command-line interface for kernel management. Prompt: >>>

Modulesยง

commands
Shell command registry and entry points
mouse ๐Ÿ”’
Mouse input and rendering are independent of shell command execution. Dequeue only after acquiring the writer, so contention never loses an update.
output
Shell output formatting and capture.
parser
Shell command parser with pipeline and redirection support.
scripting
Minimal shell scripting: variable expansion, if, for, while.

Enumsยง

ShellError
Shell error types

Constantsยง

SHELL_HISTORY_CAPACITY ๐Ÿ”’

Staticsยง

SHELL_INTERRUPTED
Global flag set by Ctrl+C. Long-running commands should poll this via is_interrupted and abort early when it returns true.

Functionsยง

apply_redirect ๐Ÿ”’
Write captured output to a file (truncate or append).
char_count ๐Ÿ”’
Performs the char count operation.
clear_visible_line ๐Ÿ”’
Performs the clear visible line operation.
complete_replace_word ๐Ÿ”’
Replace the word starting at word_start (byte offset) with replacement.
delete_next_char_at_cursor ๐Ÿ”’
Performs the delete next char at cursor operation.
delete_prev_char_at_cursor ๐Ÿ”’
Performs the delete prev char at cursor operation.
execute_line ๐Ÿ”’
Execute a command line, handling scripting, pipes and redirections.
execute_pipeline ๐Ÿ”’
Execute a single pipeline (no scripting).
insert_bytes_at_cursor ๐Ÿ”’
Performs the insert bytes at cursor operation.
is_continuation_byte ๐Ÿ”’
Returns whether continuation byte.
is_interrupted
Returns true if Ctrl+C was pressed, and clears the flag.
longest_common_prefix ๐Ÿ”’
Find the longest common prefix of a set of strings.
mouse_task_main
move_cursor_left_chars ๐Ÿ”’
Performs the move cursor left chars operation.
next_char_boundary ๐Ÿ”’
Performs the next char boundary operation.
prev_char_boundary ๐Ÿ”’
Performs the prev char boundary operation.
print_bytes ๐Ÿ”’
Performs the print bytes operation.
redraw_full_line ๐Ÿ”’
Performs the redraw full line operation.
redraw_line ๐Ÿ”’
Redraw the current shell input line after the prompt
run_line
Execute one shell line without prompt/history handling.
shell_main
Main shell loop
tab_complete ๐Ÿ”’
Tab completion for command names and VFS paths.