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ยง
Enumsยง
- Tok ๐
Constantsยง
- READ_
CAP ๐
Staticsยง
- COMMANDS ๐
- Command table (also drives
helpand 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 ๐ dstitself, ordst/<basename src>ifdstis an existing directory.- lines_
args ๐ - Parse
-n N(or-N) for head/tail. Returns(count, file). - parse_
flags ๐ - Split
-abcstyle flags from operands.--ends flag parsing. - path_
err ๐ - print_
columns ๐ - print_
long ๐ - print_
net_ ๐file - remove_
tree ๐ - run_
line - Run one command line. Returns
falsewhen the session should end. - style_
for_ ๐mode - style_
for_ ๐type - tokenize ๐
- tree_
walk ๐ - usage ๐
- write_
text ๐
Type Aliasesยง
- CmdFn ๐