This commit is contained in:
Bryan Ramos 2026-04-08 16:14:55 -04:00
parent f6700648a3
commit 454cb1a9cc
3 changed files with 26 additions and 8 deletions

15
aliases
View file

@ -1,11 +1,15 @@
# Navigation
alias cd='cd -L'
# Colors
eval "$(dircolors -b)"
alias ls='ls --color=auto'
# Search
alias grep='grep --color'
alias grep='grep --color=auto'
# Tree (uses eza if available)
if command -v eza &>/dev/null; then
if command -v eza >/dev/null 2>&1; then
alias tree='eza --tree --icons=never'
fi
@ -14,5 +18,8 @@ if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
alias open='xdg-open'
fi
alias vi='/usr/bin/vim'
alias vim='/usr/bin/nvim'
if command -v nvim >/dev/null 2>&1; then
alias vim='nvim'
fi
alias cdg='cd "$(git rev-parse --show-toplevel 2>/dev/null)"'

13
bashrc
View file

@ -1,10 +1,13 @@
# Use gpg-agent for SSH (YubiKey support)
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
if command -v gpgconf >/dev/null 2>&1; then
export SSH_AUTH_SOCK
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
# Source prompt and aliases
BASH_CONFIG_DIR="${BASH_SOURCE%/*}"
source "$BASH_CONFIG_DIR/prompt"
source "$BASH_CONFIG_DIR/aliases"
. "$BASH_CONFIG_DIR/prompt"
. "$BASH_CONFIG_DIR/aliases"
# Vi mode
set -o vi
@ -12,3 +15,7 @@ set -o vi
# Completion
bind 'set completion-ignore-case on'
bind 'set completion-map-case on'
if command -v direnv >/dev/null 2>&1; then
eval "$(direnv hook bash)"
fi

4
prompt
View file

@ -172,4 +172,8 @@ git() {
return $ret
}
if [ -n "$PROMPT_COMMAND" ]; then
PROMPT_COMMAND="_set_prompt;$PROMPT_COMMAND"
else
PROMPT_COMMAND="_set_prompt"
fi