feat: working on spawning commands
This commit is contained in:
@@ -11,6 +11,9 @@ pub fn print_help(arg: Option<SparseCommands>) {
|
||||
Some(SparseCommands::SysInfo) => println!(
|
||||
"Prints system information from the system you are connecting to"
|
||||
),
|
||||
Some(SparseCommands::Cd { .. }) => println!(
|
||||
"Changes the current working directory you are in"
|
||||
),
|
||||
None => println!(
|
||||
"\n{}{}\n\
|
||||
\n\
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::{
|
||||
io::{self, Read, Write},
|
||||
os::fd::AsRawFd,
|
||||
path::PathBuf,
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
@@ -16,6 +17,9 @@ pub enum SparseCommands {
|
||||
SysInfo,
|
||||
#[structopt(name = "#exit")]
|
||||
Exit,
|
||||
Cd {
|
||||
folder: PathBuf,
|
||||
},
|
||||
}
|
||||
|
||||
macro_rules! libc_try {
|
||||
@@ -45,6 +49,10 @@ fn convert_termios_raw(attrs: &mut libc::termios) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn run_command(connection: Arc<Connection>) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) async fn shell(
|
||||
connection: Arc<Connection>,
|
||||
mut capabilities: Capabilities,
|
||||
|
||||
Reference in New Issue
Block a user