diff --git a/try.rb b/try.rb index 9b4b91d..ae05ea5 100755 --- a/try.rb +++ b/try.rb @@ -897,12 +897,13 @@ def cmd_init!(args, tries_path) fish_script = <<~SHELL function try set -l script_path "#{script_path}" + set -l cmd "" # Check if first argument is a known command switch $argv[1] case clone worktree init - set -l cmd (/usr/bin/env ruby "$script_path"#{path_arg} $argv 2>/dev/tty | string collect) + set cmd (/usr/bin/env ruby "$script_path"#{path_arg} $argv 2>/dev/tty | string collect) case '*' - set -l cmd (/usr/bin/env ruby "$script_path" cd#{path_arg} $argv 2>/dev/tty | string collect) + set cmd (/usr/bin/env ruby "$script_path" cd#{path_arg} $argv 2>/dev/tty | string collect) end set -l rc $status if test $rc -eq 0