'which' command is now 'title'

This commit is contained in:
Valerie Wolfe 2024-07-01 09:53:52 -04:00
parent e930af1027
commit 1f143f00ad
3 changed files with 6 additions and 6 deletions

View file

@ -51,8 +51,8 @@ pub fn switch(state: &mut State) {
.output().ok();
}
pub fn which(state: State) {
state.session_enforce("which");
pub fn title(state: State) {
state.session_enforce("title");
if let Some(title) = state.title { println!("{title}"); }
}

View file

@ -25,7 +25,7 @@ commands:
path print session path (session)
switch switch to another session (session)
which print session title (session)
title print session title (session)
Use 'remux help <command>' to see detailed help text for each command.
@ -102,7 +102,7 @@ flags:
-n, --nest Create the session inside another session.
-t, --target <dir> Sets the target directory for the new session."),
Some("root")
Some("p" | "path")
=>
println!("remux path
Print the session path (#{{session_path}}) to standard output.

View file

@ -61,8 +61,8 @@ fn main() {
Some("s" | "switch")
=> command::session::switch(&mut state),
Some("w" | "which" | "title")
=> command::session::which(state),
Some("t" | "title" | "which")
=> command::session::title(state),
_
=> error::no_subcommand(target.unwrap())