g
g copied to clipboard
Fish shell support
Is your feature request related to a problem? Please describe. Thanks for the great tools. Unfortunately, Fish Shell is not supported.
Describe the solution you'd like I wrote a bash shell for setting up my fish shell
cat >${HOME}/.g/env.fish <<-'EOF_ENV_FISH'
# g shell setup for fish
set -gx GOROOT "$HOME/.g/go"
set -gx G_MIRROR "https://golang.google.cn/dl/"
# Add g, GOROOT/bin, and GOPATH/bin (if set) to PATH using fish_add_path
fish_add_path "$HOME/.g/bin"
fish_add_path "$GOROOT/bin"
set -gx GOPATH "$HOME/go"
if set -q GOPATH;
fish_add_path "$GOPATH/bin"
end
EOF_ENV_FISH
fish_conf_d_dir="${HOME}/.config/fish/conf.d"
mkdir -p "${fish_conf_d_dir}"
cat >"${fish_conf_d_dir}/g.fish" <<-'EOF_G_FISH_CONF'
# g shell setup
if test -s "$HOME/.g/env.fish"; and source "$HOME/.g/env.fish"; end
EOF_G_FISH_CONF
So does it work?
Yes, it works on both of my two macOS devices. You can also put these commands in your install.sh script to test it.
Could you create a pull request?