feat: default to 'show' subcommand when jjf is invoked without args
Mirrors the original bash+fzf script's behavior — `jjf` alone becomes a quick rev browser. Implemented in shell wrappers (so the --emit history-rewrite path still applies); the binary itself still prints usage on bare invocation, for explicit invocations.
This commit is contained in:
4 files changed
+15
-9
No files matched your search
+3
-3
@@ -1,10 +1,10 @@
|
||||
function jjf
|
||||
set -e _jjf_pending_swap
|
||||
# Meta-commands and bare flags bypass the picker and run the binary directly.
|
||||
# No args → default to `show` so `jjf` alone is a rev browser.
|
||||
if test (count $argv) -eq 0
|
||||
command jjf
|
||||
return $status
|
||||
set argv show
|
||||
end
|
||||
# Meta-commands and bare flags bypass the picker and run the binary directly.
|
||||
if test "$argv[1]" = init; or string match -q -- '-*' $argv[1]
|
||||
command jjf $argv
|
||||
return $status
|
||||
|
||||
Reference in new issue
Block a user