cleaning upp
parent
5505cb48c6
commit
a847b56b05
@ -1,58 +0,0 @@
|
||||
mod command;
|
||||
|
||||
pub use command::Command;
|
||||
|
||||
/*
|
||||
Posix Shell builtins:
|
||||
|
||||
alias bg cd command false fc fg getopts hash jobs kill
|
||||
newgrp pwd read true type ulimit umask unalias wait
|
||||
|
||||
Bourne Shell builtins:
|
||||
|
||||
: - do nothing except expand arguments and perform redirections
|
||||
. - read and execute a file in the current shell context
|
||||
break - exit from a loop
|
||||
cd - change the current working directory to directory
|
||||
continue - resume the next iteration of a loop
|
||||
eval - evaluate the arguments as a single command
|
||||
exec - replace the shell without creating a new process
|
||||
exit - exits the process with a status
|
||||
export - exports environment variables
|
||||
getopts - used by shell scripts to parse arguments
|
||||
hash - displays the hash table used by the shell to map command names to files
|
||||
pwd - prints the absolute path of the current directory
|
||||
readonly - mark each name as readonly so that they cannot be reassigned
|
||||
return - causes a shell function to stop execution and return a value
|
||||
shift - shifts the position parameters to the left by n
|
||||
test - evaluate a conditional expression and return a status of 0 or 1
|
||||
times - print out the user and system times used by the shell and its children. sorry, what the fuck is this
|
||||
trap - execute commands when a given signal is received
|
||||
umask - set the shell process's file creation mask
|
||||
unset - clears variable or function names
|
||||
|
||||
Bash Builtins:
|
||||
|
||||
alias - creates an alias for a command
|
||||
bind - adds key bindings
|
||||
builtin - access a builtin function even if it has been masked by another function
|
||||
caller - tells you what line number you're executing?
|
||||
command - runs a command with a given name, ignoring shell functions
|
||||
declare - declare variables and give them attributes
|
||||
echo - echos the outputs
|
||||
enable - enable and disable builtin shell commands
|
||||
help - display help text about builtin commands
|
||||
let - perform arithmetic on shell variables
|
||||
local - create local variables
|
||||
logout - exits a login shell with a status
|
||||
mapfile - read lines from stdin or a file into an array
|
||||
printf - formats arguments using a format string
|
||||
read - reads one line from stdin or from a file
|
||||
readarray - read lines from stdin into an array or something
|
||||
source - executes the script in the current shell
|
||||
type - tells you if a thing is an alias, function, builtin, or file command
|
||||
typeset - synonym for declare, included for korn shell compatibility
|
||||
ulimit - provides control over the resources available to the processes started by the shell
|
||||
unalias - clears an alias
|
||||
|
||||
*/
|
@ -1,7 +0,0 @@
|
||||
use anyhow::Result;
|
||||
|
||||
pub trait Command {
|
||||
fn name() -> String;
|
||||
fn create() -> Self;
|
||||
fn exec(&mut self, args: Vec<&str>) -> Result<bool>;
|
||||
}
|
Loading…
Reference in New Issue