feat: add pnpm
This commit is contained in:
+26
-27
@@ -2,7 +2,6 @@
|
||||
# option
|
||||
fish_vi_key_bindings
|
||||
|
||||
|
||||
#################################################################
|
||||
# basic
|
||||
# 定义一个函数来检查并添加路径到 PATH
|
||||
@@ -55,12 +54,10 @@ 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
|
||||
|
||||
|
||||
#################################################################
|
||||
# node
|
||||
add_to_path /usr/local/node/bin
|
||||
|
||||
|
||||
#################################################################
|
||||
# python
|
||||
set -gx PYENV_ROOT $HOME/.pyenv
|
||||
@@ -71,7 +68,6 @@ end
|
||||
|
||||
add_to_path $PYENV_ROOT/bin
|
||||
|
||||
|
||||
#################################################################
|
||||
# nvim
|
||||
add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin
|
||||
@@ -80,7 +76,6 @@ function gtr
|
||||
go test -gcflags=all=-l -v -run=$argv
|
||||
end
|
||||
|
||||
|
||||
#################################################################
|
||||
# git
|
||||
# alias
|
||||
@@ -92,54 +87,52 @@ alias swg="swag init -o docs -g "
|
||||
alias sws="swagger serve -F=swagger"
|
||||
alias sourceit="source ~/.config/fish/config.fish"
|
||||
|
||||
|
||||
#################################################################
|
||||
# docker
|
||||
function dc
|
||||
# 检查 docker-compose 是否可用
|
||||
if command -v docker-compose > /dev/null
|
||||
set compose_cmd "docker-compose"
|
||||
if command -v docker-compose >/dev/null
|
||||
set compose_cmd docker-compose
|
||||
else
|
||||
set compose_cmd "docker compose"
|
||||
end
|
||||
|
||||
switch $argv[1]
|
||||
case 'build'
|
||||
case build
|
||||
$compose_cmd build $argv[2..-1]
|
||||
case 'run'
|
||||
case run
|
||||
$compose_cmd run $argv[2..-1]
|
||||
case 'exec'
|
||||
case exec
|
||||
$compose_cmd exec $argv[2..-1]
|
||||
case 'l'
|
||||
case l
|
||||
$compose_cmd logs $argv[2..-1]
|
||||
case 'lf'
|
||||
case lf
|
||||
$compose_cmd logs -f $argv[2..-1]
|
||||
case 'restart'
|
||||
case restart
|
||||
$compose_cmd restart $argv[2..-1]
|
||||
case 'rm'
|
||||
case rm
|
||||
$compose_cmd rm $argv[2..-1]
|
||||
case 'pull'
|
||||
case pull
|
||||
$compose_cmd pull $argv[2..-1]
|
||||
case 'stop'
|
||||
case stop
|
||||
$compose_cmd stop $argv[2..-1]
|
||||
case 'kill'
|
||||
case kill
|
||||
$compose_cmd kill $argv[2..-1]
|
||||
case 'pause'
|
||||
case pause
|
||||
$compose_cmd pause $argv[2..-1]
|
||||
case 'unpause'
|
||||
case unpause
|
||||
$compose_cmd unpause $argv[2..-1]
|
||||
case 'up'
|
||||
case up
|
||||
$compose_cmd up -d $argv[2..-1] && $compose_cmd logs -f $argv[2..-1]
|
||||
case 'reup'
|
||||
case reup
|
||||
$compose_cmd up -d --force-recreate $argv[2..-1] && $compose_cmd logs -f $argv[2..-1]
|
||||
case 'down'
|
||||
case down
|
||||
$compose_cmd down $argv[2..-1]
|
||||
case '*'
|
||||
$compose_cmd $argv
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#################################################################
|
||||
# other
|
||||
function ctl
|
||||
@@ -161,8 +154,6 @@ function refish
|
||||
echo "Fish configuration updated!"
|
||||
end
|
||||
|
||||
|
||||
|
||||
# vi config
|
||||
alias fvi="vim ~/.config/fish/custom.fish"
|
||||
# cd config
|
||||
@@ -201,9 +192,17 @@ function source_env
|
||||
end
|
||||
end
|
||||
|
||||
function make2
|
||||
function make2
|
||||
make -f Makefile.local $argv
|
||||
end
|
||||
|
||||
# Added by OrbStack: command-line tools and integration
|
||||
# This won't be added again if you remove it.
|
||||
source ~/.orbstack/shell/init2.fish 2>/dev/null || :
|
||||
|
||||
# pnpm
|
||||
set -gx PNPM_HOME $HOME/.pnpm
|
||||
if not string match -q -- $PNPM_HOME $PATH
|
||||
set -gx PATH "$PNPM_HOME" $PATH
|
||||
end
|
||||
# pnpm end
|
||||
|
||||
@@ -36,3 +36,4 @@ _set_env*.sh
|
||||
.env*
|
||||
!.env.example
|
||||
Makefile.local
|
||||
.netrc
|
||||
|
||||
@@ -1281,7 +1281,9 @@
|
||||
<key>Screen</key>
|
||||
<integer>-1</integer>
|
||||
<key>Scrollback Lines</key>
|
||||
<integer>1000</integer>
|
||||
<integer>5000</integer>
|
||||
<key>Scrollback With Status Bar</key>
|
||||
<true/>
|
||||
<key>Selected Text Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
@@ -1461,5 +1463,7 @@
|
||||
<false/>
|
||||
<key>VisualIndicatorForEsc</key>
|
||||
<false/>
|
||||
<key>findMode_iTerm</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user