Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions try.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down