version builtin command

pull/1/head
Able 2021-05-28 23:36:04 -05:00
parent b79d749ae4
commit 806ea59664
1 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ use std::{
path::Path,
process::{Child, Command, Stdio},
};
const VERSION: &str = env!("CARGO_PKG_VERSION");
fn main() {
loop {
// use the `>` character as the prompt
@ -38,6 +38,7 @@ fn main() {
previous_command = None;
}
"version" => println!("Rash version: {}", VERSION),
"exit" => return,
command => {
let stdin = previous_command.map_or(Stdio::inherit(), |output: Child| {