Skip to content

Commit f5dade5

Browse files
committed
fix: address CodeRabbit review feedback
- Quote $src in resolve_script_dir symlink check (bin/git-gtr) - Add gtr.ui.color description in fish config completions - Add gtr.ui.color case in generate-completions.sh
1 parent 3c09a8b commit f5dade5

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

bin/git-gtr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resolve_script_dir() {
2020
local dir
2121
dir="$(cd -P "$(dirname "$src")" && pwd)"
2222
src="$(readlink "$src")"
23-
[[ $src != /* ]] && src="$dir/$src"
23+
[[ "$src" != /* ]] && src="$dir/$src"
2424
done
2525
cd -P "$(dirname "$src")/.." && pwd
2626
}

completions/git-gtr.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ complete -f -c git -n '__fish_git_gtr_using_command config' -a "
140140
gtr.worktrees.prefix 'Worktree folder prefix'
141141
gtr.defaultBranch 'Default branch'
142142
gtr.provider 'Hosting provider (github, gitlab)'
143-
gtr.ui.color 'gtr.ui.color'
143+
gtr.ui.color 'Color output mode (auto, always, never)'
144144
"
145145

146146
# Helper function to get branch names and special '1' for main repo

scripts/generate-completions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ MIDDLE2
624624
gtr.hook.preRemove) desc="Pre-remove hook (abort on failure)" ;;
625625
gtr.hook.postRemove) desc="Post-remove hook" ;;
626626
gtr.hook.postCd) desc="Post-cd hook (shell integration only)" ;;
627+
gtr.ui.color) desc="Color output mode (auto, always, never)" ;;
627628
*) desc="$key" ;;
628629
esac
629630
printf " %s\t'%s'\n" "$key" "$desc"

0 commit comments

Comments
 (0)