From 262c70e0f075b25bcf3642e028afaf47d4467951 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 17 May 2022 08:32:51 +0200 Subject: [PATCH] Update aliases and Go snippets --- vim/after/ftplugin/go.vim | 2 ++ zshrc | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 3165d83..70fff07 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -72,3 +72,5 @@ iabbrev ior io.Reader iabbrev iow io.Writer iabbrev gof go func() {}()kcc=Eatchar('\s') iabbrev fortc for _, tc := range testCases {t.Run(tc.name, func(t *testing.T) {})}kkcc=Eatchar('\s') +iabbrev mapss map[string]string +iabbrev mapsi map[string]int diff --git a/zshrc b/zshrc index 8e691df..398743c 100644 --- a/zshrc +++ b/zshrc @@ -55,7 +55,10 @@ alias be="bundle exec" alias berc="bundle exec rails console" alias bers="bundle exec rails server" alias berspec="bundle exec rspec --format=progress --no-profile" +alias bj="bat -l json" +alias by="bat -l yaml" alias c="clear" +alias cat="bat" alias cdg=cdgit alias cdgit='cd $(git rev-parse --show-toplevel)' alias clp="tmux kill-pane" @@ -80,7 +83,14 @@ alias h="helm" alias ji="jira -b" alias k="kubectl" alias kcc="kubectl config current-context" -alias kp="kubectl get pods -o wide" +alias kcurl="kubectl run curl --image curlimages/curl --image-pull-policy=Always -it --rm -- sh" +alias kd="kubectl describe" +alias kdel="kubectl delete" +alias kg="kubectl get" +alias kgp="kubectl get pod -o wide" +alias kgs="kubectl get svc -o wide" +ksecd() { kubectl get secret "$1" -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}' } +alias kw="kubectl get events -w --sort-by='.metadata.creationTimestamp'" alias k9="kill -9" alias ll="exa -l --group-directories-first --git" alias ls="exa --color=auto"