Skip to content

Commit cd86979

Browse files
committed
add "use" for interactive, update interactive exit messaging, bump to 3.6.3
1 parent be55281 commit cd86979

6 files changed

Lines changed: 20 additions & 20 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sigi"
3-
version = "3.6.2"
3+
version = "3.6.3"
44
authors = ["J.R. Hill <justin@so.dang.cool>"]
55
edition = "2021"
66
license = "GPL-2.0-only"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Use subcommands in interactive mode directly. No OPTIONS (flags) are understood
5656
The following additional commands are available:
5757
? Show the short version of "help"
5858
clear Clear the terminal screen
59-
stack Change to the specified stack
60-
quit/q/exit Quit interactive mode
59+
use Change to the specified stack [aliases: stack]
60+
exit Quit interactive mode [aliases: quit, q]
6161
```
6262

6363
# Examples

sigi.1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH sigi 1 "October 15, 2023" "version 3.6.2" "USER COMMANDS"
1+
.TH sigi 1 "February 1, 2024" "version 3.6.3" "USER COMMANDS"
22
.\"
33
.SH NAME
44
sigi \- An organizing tool for terminal lovers who hate organizing
@@ -148,11 +148,11 @@ Show the short version of \"help\"
148148
clear
149149
Clear the terminal screen
150150
.TP
151-
stack
152-
Change to the specified stack
151+
use
152+
Change to the specified stack [aliases: stack]
153153
.TP
154-
quit/q/exit
155-
Quit interactive mode
154+
exit
155+
Quit interactive mode [aliases: quit, q]
156156
.RE
157157
.\"
158158
.\" ================================

src/cli/interact.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The ; character can be used to separate commands.
1717
The following additional commands are available:
1818
? Show the short version of \"help\"
1919
clear Clear the terminal screen
20-
stack Change to the specified stack
21-
quit/q/exit Quit interactive mode";
20+
use Change to the specified stack [aliases: stack]
21+
exit Quit interactive mode [aliases: quit, q]";
2222

2323
pub const INTERACT_LONG_INSTRUCTIONS: &str = "INTERACTIVE MODE:
2424
@@ -43,10 +43,10 @@ In interactive mode, the following additional commands are available:
4343
Show the short version of \"help\"
4444
clear
4545
Clear the terminal screen
46-
stack
47-
Change to the specified stack
48-
quit/q/exit
49-
Quit interactive mode";
46+
use
47+
Change to the specified stack [aliases: stack]
48+
exit
49+
Quit interactive mode [aliases: quit, q]";
5050

5151
// TODO: pagination/scrollback?
5252
// TODO: more comprehensive tests
@@ -120,7 +120,7 @@ fn print_welcome_msg(output: OutputFormat) {
120120
if output.is_nonquiet_for_humans() {
121121
println!("sigi {}", SIGI_VERSION);
122122
println!(
123-
"Type \"quit\", \"q\", or \"exit\" to quit. (On Unixy systems, Ctrl+C or Ctrl+D also work)"
123+
"Type \"exit\", \"quit\", or \"q\" to quit. (On Unixy systems, Ctrl+C or Ctrl+D also work)"
124124
);
125125
println!("Type \"?\" for quick help, or \"help\" for a more verbose help message.");
126126
println!();
@@ -178,7 +178,7 @@ fn parse_line(line: String, stack: String) -> InteractAction {
178178
"help" => InteractAction::LongHelp,
179179
"clear" => InteractAction::Clear,
180180
"exit" | "quit" | "q" => InteractAction::Exit(term),
181-
"stack" => match tokens.get(1) {
181+
"use" | "stack" => match tokens.get(1) {
182182
Some(stack) => InteractAction::UseStack(stack.to_string()),
183183
None => InteractAction::MissingArgument("stack name".to_string()),
184184
},

tests/interactive_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn sigi_interactive_preamble() {
77
let res = sigi("_integ::interactive", &["interactive"]);
88
res.assert_success();
99
res.assert_stdout_line_starts_with("sigi 3.6");
10-
res.assert_stdout_line_starts_with(r#"Type "quit", "q", or "exit" to quit"#);
10+
res.assert_stdout_line_starts_with(r#"Type "exit", "quit", or "q" to quit"#);
1111
res.assert_stdout_line_starts_with(
1212
r#"Type "?" for quick help, or "help" for a more verbose help message"#,
1313
);
@@ -18,7 +18,7 @@ fn sigi_interactive_preamble() {
1818
fn sigi_interactive_basic() {
1919
let res = piping(&["push hello world"]).into_sigi("_integ::interactive", &["interactive"]);
2020
res.assert_stdout_line_starts_with("sigi 3.6");
21-
res.assert_stdout_line_starts_with(r#"Type "quit", "q", or "exit" to quit"#);
21+
res.assert_stdout_line_starts_with(r#"Type "exit", "quit", or "q" to quit"#);
2222
res.assert_stdout_line_starts_with(
2323
r#"Type "?" for quick help, or "help" for a more verbose help message"#,
2424
);
@@ -35,7 +35,7 @@ fn sigi_interactive_basic_semicolons() {
3535
res.assert_stderr_empty();
3636
res.assert_stdout_lines_eq(&[
3737
"*",
38-
r#"Type "quit", "q", or "exit" to quit. (On Unixy systems, Ctrl+C or Ctrl+D also work)"#,
38+
r#"Type "exit", "quit", or "q" to quit. (On Unixy systems, Ctrl+C or Ctrl+D also work)"#,
3939
r#"Type "?" for quick help, or "help" for a more verbose help message."#,
4040
"",
4141
"Created: goodbye",

0 commit comments

Comments
 (0)