Skip to content

Commit f595909

Browse files
committed
fix(doctor): enhance shell integration guidance for fish and other shells
- Updated the shell integration message to provide specific instructions for fish users and a general hint for other shells, improving clarity on how to initialize gtr cd.
1 parent c9e8636 commit f595909

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/commands/doctor.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ cmd_doctor() {
131131
if [ -n "$_rc_file" ] && [ -f "$_rc_file" ] && grep -q 'git gtr init' "$_rc_file" 2>/dev/null; then
132132
echo "[OK] Shell integration: loaded (gtr cd available)"
133133
else
134-
echo "[i] Shell integration: eval \"\$(git gtr init $_shell_name)\" in ${_rc_file##*/} for gtr cd"
134+
local _init_hint
135+
if [ "$_shell_name" = "fish" ]; then
136+
_init_hint="git gtr init fish | source"
137+
else
138+
_init_hint="eval \"\$(git gtr init $_shell_name)\""
139+
fi
140+
echo "[i] Shell integration: $_init_hint in ${_rc_file##*/} for gtr cd"
135141
fi
136142

137143
echo ""

0 commit comments

Comments
 (0)