File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,22 @@ echo "Installed ${BINARY} and ghapp-gh to ${INSTALL_DIR}"
6767
6868case " :$PATH :" in
6969 * " :$INSTALL_DIR :" * ) ;;
70- * ) echo " "
71- echo " WARNING: $INSTALL_DIR is not in your PATH. Add it with:"
72- echo " export PATH=\" $INSTALL_DIR :\$ PATH\" "
73- echo " Then add that line to your ~/.bashrc or ~/.zshrc to make it permanent."
74- ;;
70+ * )
71+ # Detect user's shell rc file
72+ case " $( basename " $SHELL " ) " in
73+ zsh) RC_FILE=" $HOME /.zshrc" ;;
74+ fish) RC_FILE=" $HOME /.config/fish/config.fish" ;;
75+ * ) RC_FILE=" $HOME /.bashrc" ;;
76+ esac
77+ echo " "
78+ echo " WARNING: $INSTALL_DIR is not in your PATH. Run:"
79+ case " $( basename " $SHELL " ) " in
80+ fish)
81+ echo " echo 'fish_add_path $INSTALL_DIR ' >> $RC_FILE && source $RC_FILE "
82+ ;;
83+ * )
84+ echo " echo 'export PATH=\"\$ HOME/.local/bin:\$ PATH\" ' >> $RC_FILE && source $RC_FILE "
85+ ;;
86+ esac
87+ ;;
7588esac
You can’t perform that action at this time.
0 commit comments