mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-14 15:09:44 +00:00
37
.zshrc
37
.zshrc
@@ -117,7 +117,6 @@ function replace_remote() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function rsync_work() {
|
||||
remote_dir="/home/tangli"
|
||||
local_work=`pwd`
|
||||
@@ -155,6 +154,7 @@ function git_clean() {
|
||||
then
|
||||
echo 'Invalid parameter, should based on develop/main/master'
|
||||
else
|
||||
git fetch --all --prune
|
||||
git checkout $1 && \
|
||||
git config pull.rebase false && \
|
||||
git pull && \
|
||||
@@ -162,6 +162,21 @@ function git_clean() {
|
||||
fi
|
||||
}
|
||||
|
||||
function bitnami_seal() {
|
||||
if [[ $# != 2 ]]
|
||||
then
|
||||
echo 'Invalid parameter, should be like bitnami_seal <namespace> <filename>'
|
||||
else
|
||||
if [[ $2 != *".raw.yaml" ]]; then
|
||||
echo "The variable does not have the .raw.yaml extension"
|
||||
exit 1
|
||||
fi
|
||||
# parse *.raw.yaml to *.yaml
|
||||
newname=${2//.raw/}
|
||||
kubeseal --controller-namespace sealed-secrets --controller-name sealed-secrets -oyaml -n $1 < $2 > $newname
|
||||
fi
|
||||
}
|
||||
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
eval "$(starship init zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
@@ -181,6 +196,8 @@ alias kget='kubectl get'
|
||||
alias kdesc='kubectl describe'
|
||||
alias klog='kubectl logs'
|
||||
alias kapply='kubectl apply'
|
||||
alias gce='gh copilot explain'
|
||||
alias gcs='gh copilot suggest'
|
||||
alias vi='nvim'
|
||||
#alias wol_xps8940="host home.d0zingcat.xyz | cut -d ' ' -f 4 | cat | xargs -I {} wakeonlan -i {} -p 200 'FC:44:82:13:BA:0F'"
|
||||
alias batc='bat --paging=never'
|
||||
@@ -192,6 +209,8 @@ alias pn='pnpm'
|
||||
|
||||
[[ $commands[kubectl] ]] && source <(kubectl completion zsh) && compdef __start_kubectl k
|
||||
[[ $commands[helm] ]] && source <(helm completion zsh)
|
||||
# [[ $commands[gh] ]] && source <(gh completion -s zsh)
|
||||
|
||||
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
|
||||
[ -f /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc ] && . /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc
|
||||
[ -f /usr/share/fzf/completion.zsh ] && source /usr/share/fzf/completion.zsh
|
||||
@@ -207,3 +226,19 @@ alias pn='pnpm'
|
||||
#export PYENV_VIRTUALENV_DISABLE_PROMPT=1
|
||||
#eval "$(pyenv init -)"
|
||||
#eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/Users/d0zingcat/.pyenv/versions/miniforge3-22.11.1-4/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/Users/d0zingcat/.pyenv/versions/miniforge3-22.11.1-4/etc/profile.d/conda.sh" ]; then
|
||||
. "/Users/d0zingcat/.pyenv/versions/miniforge3-22.11.1-4/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/Users/d0zingcat/.pyenv/versions/miniforge3-22.11.1-4/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
defaultBranch = main
|
||||
|
||||
[user]
|
||||
email = i@d0zingcat.dev
|
||||
name = Lee Tang
|
||||
email = leewtang@gmail.com
|
||||
name = d0zingcat
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPaVruhhL4O9BiAncnW1wH3jc7/hsqsXLknA8Xtnjjee
|
||||
|
||||
[commit]
|
||||
@@ -64,3 +64,8 @@
|
||||
[mergetool "sourcetree"]
|
||||
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
||||
trustExitCode = true
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
|
||||
@@ -16,6 +16,7 @@ require("neodev").setup({
|
||||
local servers = {
|
||||
lua_ls = {},
|
||||
bashls = {},
|
||||
helm_ls = {},
|
||||
yamlls = {
|
||||
filetypes = { 'yaml', 'yml' },
|
||||
settings = {
|
||||
|
||||
@@ -97,9 +97,13 @@ return require('packer').startup(function(use)
|
||||
require('config.nvim_telescope')
|
||||
end,
|
||||
requires = {
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', config = function()
|
||||
require('telescope').load_extension('fzf')
|
||||
end }
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
run = 'make',
|
||||
config = function()
|
||||
require('telescope').load_extension('fzf')
|
||||
end
|
||||
}
|
||||
},
|
||||
})
|
||||
use({
|
||||
@@ -162,12 +166,15 @@ return require('packer').startup(function(use)
|
||||
},
|
||||
})
|
||||
use({
|
||||
'iamcco/markdown-preview.nvim',
|
||||
run = 'cd app && npm install',
|
||||
setup = function()
|
||||
vim.g.mkdp_filetypes = { 'markdown' }
|
||||
end,
|
||||
ft = { 'markdown' },
|
||||
"iamcco/markdown-preview.nvim",
|
||||
run = function() vim.fn["mkdp#util#install"]() end,
|
||||
})
|
||||
|
||||
use({
|
||||
"iamcco/markdown-preview.nvim",
|
||||
run = "cd app && npm install",
|
||||
setup = function() vim.g.mkdp_filetypes = { "markdown" } end,
|
||||
ft = { "markdown" },
|
||||
})
|
||||
use({
|
||||
'nvim-lualine/lualine.nvim',
|
||||
|
||||
Reference in New Issue
Block a user