Skip to main content

Module shell

Module shell 

Source
Expand description

Command interpreter for the telnet console: every VFS operation exposed to userspace (ls, cat, cd, mkdir, rm, mv, cp, stat, tree, โ€ฆ), plus quoting, > / >> redirection and a few network helpers.

Re-exportsยง

use crate::out::ColorMode; ๐Ÿ”’
use crate::out::Out; ๐Ÿ”’
use crate::out::Style; ๐Ÿ”’
use crate::sys; ๐Ÿ”’
use crate::sys::DT_DIR; ๐Ÿ”’
use crate::sys::DT_LNK; ๐Ÿ”’
use crate::sys::EAGAIN; ๐Ÿ”’
use crate::sys::S_IFDIR; ๐Ÿ”’
use crate::sys::S_IFLNK; ๐Ÿ”’
use crate::sys::S_IFMT; ๐Ÿ”’
use crate::telnet::Session; ๐Ÿ”’
use alloc::string::String; ๐Ÿ”’
use alloc::vec::Vec; ๐Ÿ”’
use core::fmt::Write as _; ๐Ÿ”’
use strat9_syscall::call; ๐Ÿ”’
use strat9_syscall::error::Error; ๐Ÿ”’
use strat9_syscall::flag::OpenFlags; ๐Ÿ”’

Structsยง

Cand
Cmd ๐Ÿ”’
Item ๐Ÿ”’
TreeCtx ๐Ÿ”’

Enumsยง

Tok ๐Ÿ”’

Constantsยง

READ_CAP ๐Ÿ”’

Staticsยง

COMMANDS ๐Ÿ”’
Command table (also drives help and Tab completion).

Functionsยง

cmd ๐Ÿ”’
cmd_append ๐Ÿ”’
cmd_cat ๐Ÿ”’
cmd_cd ๐Ÿ”’
cmd_chmod ๐Ÿ”’
cmd_clear ๐Ÿ”’
cmd_color ๐Ÿ”’
cmd_cp ๐Ÿ”’
cmd_date ๐Ÿ”’
cmd_df ๐Ÿ”’
cmd_echo ๐Ÿ”’
cmd_grep ๐Ÿ”’
cmd_head ๐Ÿ”’
cmd_help ๐Ÿ”’
cmd_hexdump ๐Ÿ”’
cmd_history ๐Ÿ”’
cmd_ip ๐Ÿ”’
cmd_ln ๐Ÿ”’
cmd_ls ๐Ÿ”’
cmd_mkdir ๐Ÿ”’
cmd_mv ๐Ÿ”’
cmd_net ๐Ÿ”’
cmd_noop ๐Ÿ”’
cmd_pwd ๐Ÿ”’
cmd_rm ๐Ÿ”’
cmd_rmdir ๐Ÿ”’
cmd_stat ๐Ÿ”’
cmd_tail ๐Ÿ”’
cmd_term ๐Ÿ”’
cmd_touch ๐Ÿ”’
cmd_tree ๐Ÿ”’
cmd_wc ๐Ÿ”’
cmd_write ๐Ÿ”’
complete
Returns (token_start, candidates) for the text before the cursor.
copy_file ๐Ÿ”’
Stream-copy one file.
copy_tree ๐Ÿ”’
dest_path ๐Ÿ”’
dst itself, or dst/<basename src> if dst is an existing directory.
lines_args ๐Ÿ”’
Parse -n N (or -N) for head/tail. Returns (count, file).
parse_flags ๐Ÿ”’
Split -abc style flags from operands. -- ends flag parsing.
path_err ๐Ÿ”’
print_columns ๐Ÿ”’
print_long ๐Ÿ”’
print_net_file ๐Ÿ”’
remove_tree ๐Ÿ”’
run_line
Run one command line. Returns false when the session should end.
style_for_mode ๐Ÿ”’
style_for_type ๐Ÿ”’
tokenize ๐Ÿ”’
tree_walk ๐Ÿ”’
usage ๐Ÿ”’
write_text ๐Ÿ”’

Type Aliasesยง

CmdFn ๐Ÿ”’