diff --git a/.zshenv b/.zshenv index 6026fbe..c11d884 100644 --- a/.zshenv +++ b/.zshenv @@ -9,3 +9,4 @@ export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$HOME/Library/flutter/bin +. "$HOME/.cargo/env" diff --git a/.zshrc b/.zshrc index d20b4e9..9a7fc15 100644 --- a/.zshrc +++ b/.zshrc @@ -46,12 +46,14 @@ zplugin light zdharma/fast-syntax-highlighting alias ls='ls -FG' alias la='ls -aFG' alias ll='ls -alFG' +alias python="python3" +alias pip="pip3" chpwd() { ls } # Setup fzf # --------- if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then - export PATH="${PATH:+${PATH}:}/usr/local/opt/fzf/bin" + export PATH="$PATH:/usr/local/opt/fzf/bin" fi # Auto-completion @@ -66,8 +68,100 @@ export FZF_TMUX_HEIGHT='60%' export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'" alias gl='cd $(ghq root)/$(ghq list | fzf)' +function _ghq_list_jump() { + gl +} +zle -N _ghq_list_jump +bindkey '^G' _ghq_list_jump + eval "$(rbenv init -)" eval "$(jenv init -)" # added by travis gem [ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh + +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/shota/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/shota/google-cloud-sdk/path.zsh.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/shota/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/shota/google-cloud-sdk/completion.zsh.inc'; fi + +# Python +export PATH="$PATH:/Users/shota/Library/Python/3.9/bin" + +eval "$(direnv hook zsh)" +eval "$(nodenv init -)" +###-begin-npm-completion-### +# +# npm command completion script +# +# Installation: npm completion >> ~/.bashrc (or ~/.zshrc) +# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm +# + +if type complete &>/dev/null; then + _npm_completion () { + local words cword + if type _get_comp_words_by_ref &>/dev/null; then + _get_comp_words_by_ref -n = -n @ -n : -w words -i cword + else + cword="$COMP_CWORD" + words=("${COMP_WORDS[@]}") + fi + + local si="$IFS" + if ! IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ + COMP_LINE="$COMP_LINE" \ + COMP_POINT="$COMP_POINT" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)); then + local ret=$? + IFS="$si" + return $ret + fi + IFS="$si" + if type __ltrim_colon_completions &>/dev/null; then + __ltrim_colon_completions "${words[cword]}" + fi + } + complete -o default -F _npm_completion npm +elif type compdef &>/dev/null; then + _npm_completion() { + local si=$IFS + compadd -- $(COMP_CWORD=$((CURRENT-1)) \ + COMP_LINE=$BUFFER \ + COMP_POINT=0 \ + npm completion -- "${words[@]}" \ + 2>/dev/null) + IFS=$si + } + compdef _npm_completion npm +elif type compctl &>/dev/null; then + _npm_completion () { + local cword line point words si + read -Ac words + read -cn cword + let cword-=1 + read -l line + read -ln point + si="$IFS" + if ! IFS=$'\n' reply=($(COMP_CWORD="$cword" \ + COMP_LINE="$line" \ + COMP_POINT="$point" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)); then + + local ret=$? + IFS="$si" + return $ret + fi + IFS="$si" + } + compctl -K _npm_completion npm +fi +###-end-npm-completion-### + +. /usr/local/opt/asdf/libexec/asdf.sh +PATH="/usr/local/opt/gawk/libexec/gnubin:$PATH" + +export PATH="/usr/local/sbin:$PATH" diff --git a/etc/iterm2/com.googlecode.iterm2.plist b/etc/iterm2/com.googlecode.iterm2.plist index 1a0166f..636007e 100644 --- a/etc/iterm2/com.googlecode.iterm2.plist +++ b/etc/iterm2/com.googlecode.iterm2.plist @@ -234,7 +234,7 @@ NSFontPanelAttributes 1, 0 NSNavLastRootDirectory - ~/dotfiles/etc/iterm2 + ~/dev/github.com/Arc0re/Iceberg-iTerm2 NSNavPanelExpandedSizeForOpenMode {712, 448} NSQuotedKeystrokeBinding @@ -270,18 +270,20 @@ NSWindow Frame NSFontPanel 1311 113 445 77 0 0 1920 1177 + NSWindow Frame SUStatusFrame + 760 808 400 129 0 0 1920 1200 NSWindow Frame SharedPreferences - 857 677 814 486 0 0 1920 1177 + 857 597 918 566 0 0 1920 1200 NSWindow Frame iTerm Window 0 - 169 574 650 469 0 0 1920 1177 + 285 708 650 469 0 0 1920 1177 NSWindow Frame iTerm Window 1 - 516 423 650 469 0 0 1920 1177 + 0 697 650 469 0 0 1920 1177 NSWindow Frame iTerm Window 2 - 268 109 650 469 0 0 1920 1177 + 992 226 866 826 0 0 1920 1177 NSWindow Frame iTerm Window 3 - 289 86 650 469 0 0 1920 1177 + 0 0 2546 1506 0 0 1920 1177 NSWindow Frame iTerm Window 4 - 310 744 650 469 0 0 1920 1177 + 661 1411 650 469 0 0 1920 1177 NSWindow Frame iTerm Window 5 331 721 650 469 0 0 1920 1177 NSWindow Frame iTerm Window 6 @@ -2252,6 +2254,8 @@ NoSyncTimeOfFirstLaunchOfVersionWithTip 567440949.99699998 + PMPrintingExpandedStateForPrint2 + PointerActions Button,1,1,, @@ -2286,7 +2290,9 @@ PrefsCustomFolder - /Users/shota/dotfiles/etc/iterm2 + ~/dotfiles/etc/iterm2 + Print In Black And White + SUEnableAutomaticChecks SUFeedAlternateAppNameKey @@ -2296,13 +2302,15 @@ SUHasLaunchedBefore SULastCheckTime - 2019-08-11T17:05:18Z + 2021-09-04T09:35:52Z SUSendProfileInfo TabStyleWithAutomaticOption 5 WordCharacters /-+\~_. + findMode_iTerm + 0 iTerm Version 3.3.20181231-nightly