Implemented the 'help' builtin, and support for :h <topic> in ex mode
:h is an alias for the 'help' builtin. 'help' takes a single argument and tries to find a suitable match among the files in '$SHED_HPATH' if a match is found, this file is opened in your pager calling the 'help' builtin using :h in ex mode will preserve your current pending line
This commit is contained in:
@@ -115,6 +115,11 @@ impl IoMode {
|
||||
pub fn buffer(tgt_fd: RawFd, buf: String, flags: TkFlags) -> ShResult<Self> {
|
||||
Ok(Self::Buffer { tgt_fd, buf, flags })
|
||||
}
|
||||
pub fn loaded_pipe(tgt_fd: RawFd, buf: &[u8]) -> ShResult<Self> {
|
||||
let (rpipe, wpipe) = nix::unistd::pipe()?;
|
||||
write(wpipe, buf)?;
|
||||
Ok(Self::Pipe { tgt_fd, pipe: rpipe.into() })
|
||||
}
|
||||
pub fn get_pipes() -> (Self, Self) {
|
||||
let (rpipe, wpipe) = nix::unistd::pipe2(OFlag::O_CLOEXEC).unwrap();
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user