This is the Rust version of my bsh shell program.
|
, ;
, ||
, &&
cd
history
kill
exit
bg
, fg
, jobs
declare
, unset
bsh
more memory safe by using Rust's memory safety
principles$ bsh --help
bsh.
Usage:
bsh [options]
bsh [options] -c <command>
bsh [options] <file>
bsh (-h | --help)
bsh --version
Options:
-h --help Show this screen.
--version Show version.
-c If the -c option is present, then commands are read from the first non-option
argument command_string.
--log=<path> File to write log to, defaults to ~/.bsh_log
$ bsh
0|~/code
$ help
bg: bg [<jobspec>...]
cd: cd [dir]
declare: declare [name[=value] ...]
exit: exit [n]
fg: fg [job_spec]
help: help [command ...]
history: history [-c] [-s size] [n]
jobs: jobs [options] [<jobspec>...]
kill: kill pid | %jobspec
unset: unset [name ...]
git clone https://github.com/rgardner/bsh-rs
cd bsh-rs
# run bsh via cargo
cargo run
# run bsh directly
target/debug/bsh
# display bsh help
target/debug/bsh --help
# setup dev environment (e.g. git hooks)
./scripts/dev_setup.sh
# Check program for errors, quicker than full build
cargo check
# build
cargo build
run lints
cargo clippy
# run tests
cargo test
# generate documentation
cargo doc --document-private-items
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.