diff --git a/src/bin/fish_key_reader.rs b/src/bin/fish_key_reader.rs index b036500b9..ac054bee1 100644 --- a/src/bin/fish_key_reader.rs +++ b/src/bin/fish_key_reader.rs @@ -341,6 +341,7 @@ fn parse_flags(continuous_mode: &mut bool, verbose: &mut bool) -> bool { fish::BUILD_VERSION ) ); + std::process::exit(0); } 'V' => { *verbose = true; diff --git a/tests/pexpects/fkr.py b/tests/pexpects/fkr.py index 83a50b297..cee3584c4 100644 --- a/tests/pexpects/fkr.py +++ b/tests/pexpects/fkr.py @@ -18,6 +18,10 @@ send, sendline, sleep, expect_prompt, expect_re, expect_str = ( ) expect_prompt() +sendline("$fish_key_reader --version") +expect_re("fish_key_reader, version .*") +expect_prompt() + sendline("exec $fish_key_reader -c -V") # Do we get the expected startup prompt?