Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
e177b26348 | |||
2dbc4d6a28 | |||
0a5d3e11e4 | |||
5961309bab |
9
Cargo.lock
generated
9
Cargo.lock
generated
@ -5,3 +5,12 @@ version = 3
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jshell"
|
name = "jshell"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"shell_completion",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "shell_completion"
|
||||||
|
version = "0.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "73937c192504363290613e241705a02dff92ae7c03f544e2a69bbef24cc1042c"
|
||||||
|
@ -4,3 +4,4 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
shell_completion = "0.0.2"
|
||||||
|
@ -2,8 +2,10 @@ use std::{env, io::{stdin, stdout, Write}, path::Path, process::{Child, Command,
|
|||||||
|
|
||||||
fn main(){
|
fn main(){
|
||||||
loop {
|
loop {
|
||||||
|
println!("");
|
||||||
|
println!("{}", env::current_dir().unwrap().to_str().unwrap());
|
||||||
print!("> ");
|
print!("> ");
|
||||||
stdout().flush();
|
let _ = stdout().flush();
|
||||||
|
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
stdin().read_line(&mut input).unwrap();
|
stdin().read_line(&mut input).unwrap();
|
||||||
@ -66,7 +68,7 @@ fn main(){
|
|||||||
|
|
||||||
if let Some(mut final_command) = previous_command {
|
if let Some(mut final_command) = previous_command {
|
||||||
// block until the final command has finished
|
// block until the final command has finished
|
||||||
final_command.wait();
|
let _ = final_command.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user