Improve zshrc for macOS
the build failed
Details
the build failed
Details
parent
7be1a8331a
commit
131ed2ccb6
34
.zshrc
34
.zshrc
|
@ -26,7 +26,11 @@ bindkey '^R' history-incremental-search-backward
|
|||
fpath=( $HOME/.zsh/functions $fpath )
|
||||
|
||||
# ls colors
|
||||
eval $(dircolors -b $HOME/.dircolors)
|
||||
if [[ "$(uname -s)" -eq "Darwin" ]]; then
|
||||
eval $(gdircolors -b $HOME/.dircolors)
|
||||
else
|
||||
eval $(dircolors -b $HOME/.dircolors)
|
||||
fi
|
||||
|
||||
# editor
|
||||
export EDITOR=nvim
|
||||
|
@ -56,16 +60,24 @@ alias vim=nvim
|
|||
# gpg as ssh agent
|
||||
test -e "$(which gpgconf)" && export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
|
||||
# macOS GOPATH
|
||||
if [[ "$(uname -s)" -eq "Darwin" ]]; then
|
||||
export GOPATH="$HOME/Documents/go"
|
||||
fi
|
||||
|
||||
# iTerm2 integration
|
||||
test -e "$HOME/.iterm2_shell_integration.zsh" && source "$HOME/.iterm2_shell_integration.zsh"
|
||||
# hack to optionally get some oh-my-zsh back
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
test -e "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh" && source "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh"
|
||||
# legacy scripts
|
||||
test -e "$HOME/.bin" && export PATH="$HOME/.bin:$PATH" # TODO: move to .local/bin
|
||||
|
||||
# tips
|
||||
function tips {
|
||||
# hack to optionally get some oh-my-zsh back
|
||||
if [[ "$(uname -s)" -eq "Darwin" ]]; then
|
||||
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
test -e "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh" && source "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh"
|
||||
# legacy scripts
|
||||
test -e "$HOME/.bin" && export PATH="$HOME/.bin:$PATH" # TODO: move to .local/bin
|
||||
|
||||
# tips
|
||||
function tips {
|
||||
echo "Some useful commands:"
|
||||
echo " - spotify || itunes Chill out to 🎧"
|
||||
echo " - cdf Jumps to the folder open in finder"
|
||||
|
@ -93,4 +105,8 @@ function tips {
|
|||
echo " - (scroll screen, put current line at) z. (center) z+ (top) z- (bottom)"
|
||||
echo " - (scroll screen by one line) ctrl-y (up) ctrl-e (down)"
|
||||
echo " - mx (mark as x) \`x (return to x)"
|
||||
}
|
||||
}
|
||||
|
||||
tips
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue