diff --git a/fish/config.fish b/fish/config.fish index 55247dc..b0180f4 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -1,8 +1,8 @@ - ################################################################# # option fish_vi_key_bindings + ################################################################# # basic # 定义一个函数来检查并添加路径到 PATH @@ -43,7 +43,6 @@ function sudoo eval sudo $history[1] end - # add my script add_to_path $HOME/.dotfile/script $HOME/.app00/script @@ -75,13 +74,14 @@ set -gx HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles" set -gx GOPATH $HOME/go:$HOME/workrepo/go set -gx GOPROXY "goproxy.cn,direct" set -gx GOSUMDB "sum.golang.google.cn" - add_to_path $HOME/go/bin add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin -function gtr - go test -gcflags=all=-l -v -run=$argv -end + +################################################################# +# node +add_to_path /usr/local/node/bin + ################################################################# # python @@ -93,10 +93,14 @@ end add_to_path $PYENV_ROOT/bin + ################################################################# # nvim add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin set -gx EDITOR vim +function gtr + go test -gcflags=all=-l -v -run=$argv +end ################################################################# diff --git a/script/go-install.sh b/script/go-install.sh new file mode 100644 index 0000000..f7bd31c --- /dev/null +++ b/script/go-install.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# install neovim +os_arch=$(uname -s)-$(uname -m) + +case $os_arch in + "Darwin-x86_64") + cd /usr/local + wget https://golang.google.cn/dl/go1.23.2.linux-amd64.tar.gz + tar zxvf go1.23.2.linux-amd64.tar.gz + ;; + "Linux-x86_64"|"Linux-arm64") + cd /tmp + rm -rf nvim-linux64.tar.gz + wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz + tar zxvf go1.23.2.linux-amd64.tar.gz + mv go /usr/local/ + sudo ln -s /usr/local/go/bin/go/usr/local/bin/go + ;; +esac + + + +