feat: add font
This commit is contained in:
+56
-21
@@ -1,6 +1,10 @@
|
||||
|
||||
#################################################################
|
||||
# option
|
||||
fish_vi_key_bindings
|
||||
|
||||
#################################################################
|
||||
# basic
|
||||
# 定义一个函数来检查并添加路径到 PATH
|
||||
function add_to_path
|
||||
# 遍历传递给函数的所有参数
|
||||
@@ -20,18 +24,48 @@ function add_to_path
|
||||
end
|
||||
end
|
||||
|
||||
## set environment
|
||||
# default
|
||||
function refish
|
||||
echo "Updating fish configuration..."
|
||||
source ~/.config/fish/config.fish
|
||||
echo "Fish configuration updated!"
|
||||
end
|
||||
|
||||
# set environment
|
||||
set paths_to_check /usr/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/bin /opt/sbin /usr/syno/sbin /usr/syno/bin /usr/local/sbin
|
||||
for path in $paths_to_check
|
||||
add_to_path $path
|
||||
end
|
||||
|
||||
function sudoo
|
||||
eval sudo $history[1]
|
||||
end
|
||||
|
||||
|
||||
# add my script
|
||||
add_to_path $HOME/.dotfile/script $HOME/.app00/script
|
||||
|
||||
if test -f ~/.config/fish/custom.fish
|
||||
source ~/.config/fish/custom.fish
|
||||
end
|
||||
|
||||
function reset_proxy
|
||||
set -e https_proxy
|
||||
set -e ftp_proxy
|
||||
set -e no_proxy
|
||||
set -e HTTP_PROXY
|
||||
set -e HTTPS_PROXY
|
||||
set -e FTP_PROXY
|
||||
set -e NO_PROXY
|
||||
echo "Proxy environment variables have been reset."
|
||||
end
|
||||
|
||||
#################################################################
|
||||
# brew
|
||||
set -gx HOMEBREW_BREW_GIT_REMOTE "https://mirrors.ustc.edu.cn/brew.git"
|
||||
set -gx HOMEBREW_CORE_GIT_REMOTE "https://mirrors.ustc.edu.cn/homebrew-core.git"
|
||||
set -gx HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"
|
||||
|
||||
#################################################################
|
||||
# go
|
||||
set -gx GOPATH $HOME/go:$HOME/workrepo/go
|
||||
set -gx GOPROXY "goproxy.cn,direct"
|
||||
@@ -40,15 +74,29 @@ 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
|
||||
|
||||
# add nvim
|
||||
function gtr
|
||||
go test -gcflags=all=-l -v -run=$argv
|
||||
end
|
||||
|
||||
#################################################################
|
||||
# python
|
||||
set -gx PYENV_ROOT $HOME/.pyenv
|
||||
# Pyenv initialization
|
||||
if command -v pyenv 1>/dev/null 2>&1
|
||||
pyenv init - | source
|
||||
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
|
||||
|
||||
# add my script
|
||||
add_to_path $HOME/.dotfile/script $HOME/.app00/script
|
||||
|
||||
# alias
|
||||
#################################################################
|
||||
# git
|
||||
# alias
|
||||
alias gitb="git branch --show-current | tr -d '\n' | pbcopy"
|
||||
alias gci="golangci-lint run -c=~/.dotfile/.golangci.yml ./..."
|
||||
alias gmt="go mod tidy"
|
||||
@@ -58,26 +106,13 @@ alias sws="swagger serve -F=swagger"
|
||||
alias sourceit="source ~/.config/fish/config.fish"
|
||||
|
||||
|
||||
function gtr
|
||||
go test -gcflags=all=-l -v -run=$argv
|
||||
end
|
||||
|
||||
#################################################################
|
||||
# other
|
||||
function ctl
|
||||
systemctl $argv
|
||||
end
|
||||
|
||||
|
||||
if test -f ~/.config/fish/custom.fish
|
||||
source ~/.config/fish/custom.fish
|
||||
end
|
||||
|
||||
|
||||
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
|
||||
function sudoo
|
||||
eval sudo $history[1]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user