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