aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-06-04 22:10:29 -0400
committerEugene Triguba <hello@eugenetriguba.com>2026-06-04 22:18:28 -0400
commitd5a141088341524b34cd1c43ea683f8d0c7c2fe4 (patch)
tree896a9b146c51e28bbfc4e23449c1997b19c14b55
parentRemove custom vars file (diff)
downloaddotfiles-d5a141088341524b34cd1c43ea683f8d0c7c2fe4.zip
Migrate to fish
-rw-r--r--.config/fish/conf.d/env.fish20
-rw-r--r--.config/fish/conf.d/fzf.fish3
-rw-r--r--.config/fish/conf.d/git-prompt.fish3
-rw-r--r--.config/fish/conf.d/go.fish5
-rw-r--r--.config/fish/conf.d/macos.fish17
-rw-r--r--.config/fish/conf.d/pyenv.fish8
-rw-r--r--.config/fish/config.fish34
-rw-r--r--.config/fish/fish_variables4
-rwxr-xr-x.zshrc143
9 files changed, 94 insertions, 143 deletions
diff --git a/.config/fish/conf.d/env.fish b/.config/fish/conf.d/env.fish
new file mode 100644
index 0000000..4aacf61
--- /dev/null
+++ b/.config/fish/conf.d/env.fish
@@ -0,0 +1,20 @@
+set -gx TERM xterm-256color
+
+set -gx EDITOR nvim
+set -gx PAGER less
+set -gx MANPAGER less
+set -gx MANWIDTH 80
+
+set -gx GPG_TTY (tty)
+
+set -gx XDG_CONFIG_HOME $HOME/.config
+set -gx XDG_DATA_HOME $HOME/.local/share
+set -gx XDG_CACHE_HOME $HOME/.cache
+set -gx XDG_STATE_HOME $HOME/.local/state
+
+set -gx SRC_DIR $HOME/src
+set -gx BIN_DIR $HOME/bin
+
+fish_add_path \
+ $BIN_DIR \
+ $HOME/.local/bin
diff --git a/.config/fish/conf.d/fzf.fish b/.config/fish/conf.d/fzf.fish
new file mode 100644
index 0000000..d06005e
--- /dev/null
+++ b/.config/fish/conf.d/fzf.fish
@@ -0,0 +1,3 @@
+if command -q fzf
+ fzf --fish | source
+end
diff --git a/.config/fish/conf.d/git-prompt.fish b/.config/fish/conf.d/git-prompt.fish
new file mode 100644
index 0000000..91f1f97
--- /dev/null
+++ b/.config/fish/conf.d/git-prompt.fish
@@ -0,0 +1,3 @@
+set -g __fish_git_prompt_showdirtystate 1
+set -g __fish_git_prompt_showupstream auto
+set -g __fish_git_prompt_showcolorhints 1
diff --git a/.config/fish/conf.d/go.fish b/.config/fish/conf.d/go.fish
new file mode 100644
index 0000000..63924f8
--- /dev/null
+++ b/.config/fish/conf.d/go.fish
@@ -0,0 +1,5 @@
+set -gx GOPATH $SRC_DIR/go
+set -gx GOBIN $GOPATH/bin
+set -gx GOPROXY direct
+
+fish_add_path $GOBIN
diff --git a/.config/fish/conf.d/macos.fish b/.config/fish/conf.d/macos.fish
new file mode 100644
index 0000000..0df139e
--- /dev/null
+++ b/.config/fish/conf.d/macos.fish
@@ -0,0 +1,17 @@
+if test (uname) = Darwin
+ fish_add_path \
+ /opt/homebrew/bin/ \
+ /opt/homebrew/opt/curl/bin \
+ $HOME/.poetry/bin \
+ $HOME/.local/bin \
+ $HOME/Library/pnpm
+
+ if command -q brew
+ brew shellenv | source
+ end
+
+ set -gx LDFLAGS "-L/opt/homebrew/lib"
+ set -gx CPPFLAGS "-I/opt/homebrew/include"
+ set -gx LIBRARY_PATH "$LIBRARY_PATH:"(brew --prefix)"/lib"
+end
+
diff --git a/.config/fish/conf.d/pyenv.fish b/.config/fish/conf.d/pyenv.fish
new file mode 100644
index 0000000..2c45cb7
--- /dev/null
+++ b/.config/fish/conf.d/pyenv.fish
@@ -0,0 +1,8 @@
+if test -d ~/.pyenv
+ set -gx PYENV_ROOT ~/.pyenv
+ fish_add_path $PYENV_ROOT/bin
+
+ if command -q pyenv
+ pyenv init - | source
+ end
+end
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
new file mode 100644
index 0000000..82fdbde
--- /dev/null
+++ b/.config/fish/config.fish
@@ -0,0 +1,34 @@
+# Disable greeting
+set -g fish_greeting
+
+abbr -a gs git status
+abbr -a gc git commit
+abbr -a ga git add
+abbr -a gd git diff
+abbr -a gds git diff --staged
+abbr -a gp git push
+abbr -a gpo git push origin
+abbr -a gpl git pull
+abbr -a gplrb git pull --rebase
+abbr -a gl git log
+abbr -a gv "git log --graph --decorate --oneline"
+abbr -a gch git checkout
+abbr -a gcb "git checkout -b"
+
+abbr -a l "ls -al"
+
+function auto_venv --on-variable PWD
+ if test -n "$VIRTUAL_ENV"
+ set parentdir (dirname "$VIRTUAL_ENV")
+ if not string match -q "$parentdir/*" "$PWD"
+ if functions -q deactivate
+ deactivate
+ end
+ end
+ end
+ if test -z "$VIRTUAL_ENV"
+ if test -f "$PWD/.venv/bin/activate.fish"
+ source "$PWD/.venv/bin/activate.fish"
+ end
+ end
+end
diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables
new file mode 100644
index 0000000..59f8c3b
--- /dev/null
+++ b/.config/fish/fish_variables
@@ -0,0 +1,4 @@
+# This file contains fish universal variable definitions.
+# VERSION: 3.0
+SETUVAR __fish_initialized:4300
+SETUVAR fish_user_paths:/opt/homebrew/bin\x1e/opt/homebrew/opt/openjdk\x4024/bin\x1e/opt/homebrew/opt/curl/bin\x1e/Users/eugene/Library/pnpm\x1e/Users/eugene/bin\x1e/Users/eugene/\x2elocal/bin
diff --git a/.zshrc b/.zshrc
deleted file mode 100755
index fda9d58..0000000
--- a/.zshrc
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env zsh
-
-#
-# Setup Shell Prompt
-#
-# This enables a simple prompt with git info
-# and the current working directory.
-#
-autoload -Uz vcs_info
-zstyle ":vcs_info:*" enable git
-zstyle ':vcs_info:git:*' formats '%F{green}(%b)%f '
-precmd() {
- vcs_info
-}
-setopt prompt_subst
-NEWLINE=$'\n'
-PROMPT=' %2~ ${vcs_info_msg_0_}%# '
-
-# Add 'run-help' for help on built-in shell commands
-(( $+aliases[run-help] )) && unalias run-help
-autoload -Uz run-help
-
-#
-# Setup the zsh shell completion system
-#
-# See `man zshcompsys`.
-#
-autoload -Uz compinit
-compinit
-
-#
-# Setup shell history
-#
-export HISTFILE=~/.zhistory
-export HISTSIZE=1000000
-export SAVEHIST=1000000
-
-#
-# Setup default env variables
-#
-export TERM="xterm-256color"
-export EDITOR="nvim"
-export GPG_TTY=$(tty)
-export PAGER="less"
-export MANPAGER="less"
-export MANWIDTH=80
-export SRC_DIR="$HOME/src"
-export BIN_DIR="$HOME/bin"
-
-export XDG_CONFIG_HOME="$HOME/.config"
-export XDG_DATA_HOME="$HOME/.local/share"
-export XDG_CACHE_HOME="$HOME/.cache"
-export XDG_STATE_HOME="$HOME/.local/state"
-
-#
-# Language setup
-#
-export GOPATH="$SRC_DIR/go"
-export GOBIN="$SRC_DIR/go/bin"
-export PATH="$GOBIN:$PATH"
-export GOPROXY="direct"
-
-if [ -d "$HOME/.pyenv" ]; then
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
-fi
-
-if [ -f "$HOME/.cargo/env" ]; then
- . "$HOME/.cargo/env"
-fi
-
-if [ -d "$HOME/.nvm" ]; then
- export NVM_DIR="$HOME/.nvm"
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
-fi
-
-if [ -d "$HOME/.config/nvm" ]; then
- export NVM_DIR="$HOME/.config/nvm"
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
-fi
-
-if command -v fzf > /dev/null 2>&1; then
- eval "$(fzf --zsh)"
-fi
-
-#
-# Append additional directories onto PATH
-#
-export PATH="$BIN_DIR:$PATH"
-export PATH="$HOME/.local/bin:$PATH"
-
-#
-# macOS
-#
-if [ $(uname) = "Darwin" ]; then
- # Homebrew
- eval "$(brew shellenv)"
- export LDFLAGS="-L/opt/homebrew/lib"
- export CPPFLAGS="-I/opt/homebrew/include"
- export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
-
- export JAVA_HOME=$(/usr/libexec/java_home -v 24)
- export PATH="/opt/homebrew/opt/openjdk@24/bin:$PATH"
- export CPPFLAGS="-I/opt/homebrew/opt/openjdk@24/include"
-
- export PNPM_HOME="/Users/eugene/Library/pnpm"
- case ":$PATH:" in
- *":$PNPM_HOME:"*) ;;
- *) export PATH="$PNPM_HOME:$PATH" ;;
- esac
-
- export PATH="$HOME/.poetry/bin:$PATH"
- export PATH="/opt/homebrew/opt/curl/bin:$PATH"
-
- export GUILE_LOAD_PATH="/opt/homebrew/share/guile/site/3.0"
- export GUILE_LOAD_COMPILED_PATH="/opt/homebrew/lib/guile/3.0/site-ccache"
- export GUILE_SYSTEM_EXTENSIONS_PATH="/opt/homebrew/lib/guile/3.0/extensions"
-fi
-
-#
-# Aliases
-#
-alias gs="git status"
-alias gc="git commit"
-alias ga="git add"
-alias gd="git diff"
-alias gds="git diff --staged"
-alias gp="git push"
-alias gpo="git push origin"
-alias gpl="git pull"
-alias gplrb="git pull --rebase"
-alias gl="git log"
-alias gv="git log --graph --decorate --oneline"
-alias gch="git checkout"
-alias gcb="git checkout -b"
-
-alias e="emacsclient -nw"
-alias emacs="emacsclient -nw"
-
-alias h="history 25"
-alias j="jobs -l"
-alias l="ls -al"