Created
February 18, 2025 21:50
-
-
Save henvic/290bc23bdd403af5bd22cc3973a64d4f to your computer and use it in GitHub Desktop.
example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GH_EDITOR="code" | |
export FZF_DEFAULT_COMMAND='ag -g ""' | |
ZSH_DISABLE_COMPFIX=true | |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="steeef" | |
# Uncomment following line if you want to disable command autocorrection | |
DISABLE_CORRECTION="true" | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
#plugins=(kubectl git osx history zsh-syntax-highlighting z colored-man-pages nvm) | |
plugins=(kubectl zsh-kubectl-prompt git osx history zsh-syntax-highlighting z colored-man-pages iterm2 screen) | |
source $ZSH/oh-my-zsh.sh | |
export AUTOJUMP_AUTOCOMPLETE_CMDS='cp vim' | |
TERM=xterm-256color | |
alias gsh='git show HEAD' | |
alias govet='go vet $(go list ./... | grep -v /vendor/)' | |
alias gotest='go test -race -coverprofile=coverage.out && go tool cover -html coverage.out -o coverage.html' | |
alias goreport="open coverage.html" | |
alias loc="git ls-files | grep -v ^vendor/ | xargs wc -l" | |
eval "$(direnv hook zsh)" | |
autoload -U colors; colors | |
function kubectl_info() { | |
local color="cyan" | |
local kubeprompt=$ZSH_KUBECTL_PROMPT | |
kubeprompt=${kubeprompt%/default} | |
# TODO: hotpink | |
echo $kubeprompt | |
} | |
# Function to customize the displayed path | |
function custom_path { | |
local base_dir=~/go/ | |
local current_dir=$PWD | |
if [[ $current_dir == $base_dir* ]]; then | |
echo "${current_dir#$base_dir}" | |
else | |
echo "$current_dir" | |
fi | |
} | |
# Update the prompt to use the custom path function | |
PROMPT=$' | |
%{$hotpink%}%n${PR_RST} in %{$limegreen%}$(custom_path)${PR_RST} $vcs_info_msg_0_$(virtualenv_info) | |
$ ' | |
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment