163 lines
1.7 KiB
Rust
163 lines
1.7 KiB
Rust
pub use std::{
|
|
io::{
|
|
self,
|
|
Read,
|
|
Write
|
|
},
|
|
cell::RefCell,
|
|
rc::Rc,
|
|
os::fd::{
|
|
OwnedFd,
|
|
BorrowedFd,
|
|
RawFd,
|
|
FromRawFd
|
|
},
|
|
collections::{
|
|
VecDeque,
|
|
HashMap,
|
|
},
|
|
ffi::{
|
|
CStr,
|
|
CString
|
|
},
|
|
path::{
|
|
Path,
|
|
PathBuf,
|
|
},
|
|
process::{
|
|
exit
|
|
},
|
|
};
|
|
pub use bitflags::bitflags;
|
|
pub use nix::{
|
|
fcntl::{
|
|
open,
|
|
OFlag,
|
|
},
|
|
sys::{
|
|
signal::{
|
|
killpg,
|
|
kill,
|
|
signal,
|
|
pthread_sigmask,
|
|
SigmaskHow,
|
|
SigSet,
|
|
SigHandler,
|
|
Signal
|
|
},
|
|
wait::{
|
|
waitpid,
|
|
WaitStatus as WtStat,
|
|
WaitPidFlag as WtFlag
|
|
},
|
|
stat::Mode,
|
|
memfd::memfd_create,
|
|
},
|
|
errno::Errno,
|
|
unistd::{
|
|
Pid,
|
|
ForkResult::*,
|
|
fork,
|
|
getppid,
|
|
getpid,
|
|
getpgid,
|
|
getpgrp,
|
|
geteuid,
|
|
read,
|
|
write,
|
|
isatty,
|
|
tcgetpgrp,
|
|
tcsetpgrp,
|
|
dup,
|
|
dup2,
|
|
close,
|
|
},
|
|
libc,
|
|
};
|
|
pub use crate::{
|
|
libsh::{
|
|
term::{
|
|
Style,
|
|
style_text
|
|
},
|
|
utils::{
|
|
LogLevel::*,
|
|
ArgVec,
|
|
Redir,
|
|
RedirType,
|
|
RedirBldr,
|
|
StrOps,
|
|
RedirTarget,
|
|
CmdRedirs,
|
|
borrow_fd,
|
|
trim_quotes
|
|
},
|
|
collections::{
|
|
VecDequeAliases
|
|
},
|
|
sys::{
|
|
self,
|
|
write_err,
|
|
write_out,
|
|
c_pipe,
|
|
execvpe
|
|
},
|
|
error::{
|
|
ShErrKind,
|
|
ShErr,
|
|
ShResult
|
|
},
|
|
},
|
|
builtin::{
|
|
echo::echo,
|
|
cd::cd,
|
|
pwd::pwd,
|
|
read::read_builtin,
|
|
alias::alias,
|
|
jobctl::{
|
|
continue_job,
|
|
jobs
|
|
},
|
|
BUILTINS
|
|
},
|
|
expand::{
|
|
expand_argv,
|
|
alias::expand_aliases
|
|
},
|
|
shellenv::{
|
|
self,
|
|
wait_fg,
|
|
log_level,
|
|
attach_tty,
|
|
term_ctlr,
|
|
take_term,
|
|
jobs::{
|
|
JobTab,
|
|
JobID,
|
|
write_jobs,
|
|
read_jobs
|
|
},
|
|
exec_ctx::ExecFlags,
|
|
shenv::ShEnv
|
|
},
|
|
execute::Executor,
|
|
parse::{
|
|
parse::{
|
|
Node,
|
|
NdRule,
|
|
Parser,
|
|
ParseRule
|
|
},
|
|
lex::{
|
|
Span,
|
|
Token,
|
|
TkRule,
|
|
Lexer,
|
|
LexRule
|
|
},
|
|
},
|
|
log,
|
|
test,
|
|
bp,
|
|
};
|