mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-19 06:01:59 +00:00
feat(shell): align fish, bash, and zsh shell configurations
Synchronize environment variables, PATH entries, and aliases across all three shell configs to ensure consistent behavior on all hosts.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Set aliases for fish shell
|
||||
|
||||
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
|
||||
# eza aliases if eza is installed
|
||||
if type -q eza >/dev/null
|
||||
@@ -92,5 +93,40 @@ function configure_tide \
|
||||
--transient=Yes
|
||||
end
|
||||
|
||||
# Navigation aliases
|
||||
abbr --add .. 'cd ..'
|
||||
abbr --add ... 'cd ../..'
|
||||
abbr --add .... 'cd ../../..'
|
||||
|
||||
# Interesting folders
|
||||
function .b --wraps='cd $XDG_BIN_HOME' --description 'cd $XDG_BIN_HOME'
|
||||
cd $XDG_BIN_HOME $argv
|
||||
end
|
||||
|
||||
function .l --wraps='cd ~/.local' --description 'cd ~/.local'
|
||||
cd ~/.local $argv
|
||||
end
|
||||
|
||||
function .o --wraps='cd ~/Code/ivuorinen/obsidian/' --description 'cd ~/Code/ivuorinen/obsidian/'
|
||||
cd ~/Code/ivuorinen/obsidian/ $argv
|
||||
end
|
||||
|
||||
# cd to git root directory
|
||||
function cdgr --description 'cd to git root'
|
||||
if git rev-parse --is-inside-work-tree &>/dev/null
|
||||
cd (git rev-parse --show-toplevel)
|
||||
else
|
||||
echo >&2 "Not in a git repository"
|
||||
end
|
||||
end
|
||||
|
||||
# Colored grep
|
||||
abbr --add grep 'grep --color'
|
||||
|
||||
# Date helpers
|
||||
alias isodate="date +'%Y-%m-%d'"
|
||||
alias x-datetime="date +'%Y-%m-%d %H:%M:%S'"
|
||||
alias x-timestamp="date +'%s'"
|
||||
|
||||
# Random abbreviations
|
||||
abbr --add stats onefetch --nerd-fonts --true-color never
|
||||
|
||||
@@ -61,11 +61,14 @@ set -q AWS_CONFIG_FILE; or set -x AWS_CONFIG_FILE "$XDG_STATE_HOME/aws/config"
|
||||
set -q AWS_SHARED_CREDENTIALS_FILE; or set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
|
||||
set -q AWS_SESSION_TOKEN; or set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
|
||||
set -q AWS_DATA_PATH; or set -x AWS_DATA_PATH "$XDG_DATA_HOME/aws"
|
||||
set -q AWS_DEFAULT_REGION; or set -x AWS_DEFAULT_REGION eu-west-1
|
||||
set -q AWS_DEFAULT_OUTPUT; or set -x AWS_DEFAULT_OUTPUT table
|
||||
set -q AWS_CONFIGURE_KEYS; or set -x AWS_CONFIGURE_KEYS true
|
||||
set -q AWS_CONFIGURE_SESSION; or set -x AWS_CONFIGURE_SESSION true
|
||||
set -q AWS_CONFIGURE_SESSION_DURATION; or set -x AWS_CONFIGURE_SESSION_DURATION 7200
|
||||
set -q AWS_CONFIGURE_SESSION_MFA; or set -x AWS_CONFIGURE_SESSION_MFA true
|
||||
set -q AWS_CONFIGURE_REGION; or set -x AWS_CONFIGURE_REGION true
|
||||
set -q AWS_CONFIGURE_OUTPUT; or set -x AWS_CONFIGURE_OUTPUT true
|
||||
set -q AWS_CONFIGURE_PROFILE; or set -x AWS_CONFIGURE_PROFILE true
|
||||
set -q AWS_CONFIGURE_PROMPT; or set -x AWS_CONFIGURE_PROMPT true
|
||||
set -q AWS_CONFIGURE_PROMPT_DEFAULT; or set -x AWS_CONFIGURE_PROMPT_DEFAULT true
|
||||
@@ -107,7 +110,7 @@ set -q FZF_DEFAULT_OPTS; or set -x FZF_DEFAULT_OPTS \
|
||||
set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
|
||||
|
||||
# Go configuration
|
||||
# set -q GOPATH; or set -x GOPATH "$XDG_DATA_HOME/go"
|
||||
set -q GOPATH; or set -x GOPATH "$XDG_DATA_HOME/go"
|
||||
set -q GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
|
||||
|
||||
set -q GOENV_ROOT; or set -x GOENV_ROOT "$XDG_DATA_HOME/goenv"
|
||||
@@ -169,6 +172,15 @@ x-dc "$WAKATIME_HOME"
|
||||
set -q _ZO_DATA_DIR; or set -x _ZO_DATA_DIR "$XDG_DATA_HOME/zoxide"
|
||||
set -q _ZO_EXCLUDE_DIRS; or set -x _ZO_EXCLUDE_DIRS "$XDG_DATA_HOME"
|
||||
|
||||
# bkt (shell command caching tool) configuration
|
||||
set -q BKT_TTL; or set -x BKT_TTL 1m
|
||||
|
||||
# Manpager
|
||||
set -q MANPAGER; or set -x MANPAGER "less -X"
|
||||
|
||||
# Lando
|
||||
fish_add_path "$HOME/.lando/bin"
|
||||
|
||||
# Miscellaneous configuration
|
||||
set -q CHEAT_USE_FZF; or set -x CHEAT_USE_FZF true
|
||||
set -q SQLITE_HISTORY; or set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"
|
||||
|
||||
Reference in New Issue
Block a user