Initial commit for fern
This commit is contained in:
156
src/prelude.rs
Normal file
156
src/prelude.rs
Normal file
@@ -0,0 +1,156 @@
|
||||
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,
|
||||
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,
|
||||
jobctl::{
|
||||
continue_job,
|
||||
jobs
|
||||
},
|
||||
BUILTINS
|
||||
},
|
||||
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,
|
||||
};
|
||||
Reference in New Issue
Block a user