92 lines
1.8 KiB
Django/Jinja
92 lines
1.8 KiB
Django/Jinja
# Managed by Ansible
|
|
|
|
set -gx EDITOR {{ cli_editor | quote }}
|
|
set -gx VISUAL {{ cli_visual | quote }}
|
|
set -gx PAGER less
|
|
|
|
# Better less defaults
|
|
set -gx LESS "-R --use-color -Dd+r -Du+b"
|
|
|
|
# Local user bin paths
|
|
fish_add_path $HOME/.local/bin
|
|
fish_add_path /usr/local/bin
|
|
|
|
# Starship prompt
|
|
if type -q starship
|
|
starship init fish | source
|
|
end
|
|
|
|
# Smarter cd
|
|
if type -q zoxide
|
|
zoxide init fish | source
|
|
end
|
|
|
|
# Direnv integration
|
|
if type -q direnv
|
|
direnv hook fish | source
|
|
end
|
|
|
|
# fzf key bindings
|
|
if type -q fzf
|
|
fzf --fish | source 2>/dev/null
|
|
end
|
|
|
|
# Prefer modern tools when available
|
|
if type -q eza
|
|
alias ls "eza --icons --group-directories-first"
|
|
alias ll "eza -lah --icons --group-directories-first --git"
|
|
alias tree "eza --tree --icons"
|
|
else if type -q exa
|
|
alias ls "exa --icons --group-directories-first"
|
|
alias ll "exa -lah --icons --group-directories-first --git"
|
|
else
|
|
alias ll "ls -lah"
|
|
alias la "ls -A"
|
|
end
|
|
|
|
if type -q bat
|
|
alias cat "bat --paging=never"
|
|
end
|
|
|
|
if type -q rg
|
|
alias grep "rg"
|
|
end
|
|
|
|
if type -q fd
|
|
alias find "fd"
|
|
else if type -q fdfind
|
|
alias fd "fdfind"
|
|
end
|
|
|
|
# Common navigation
|
|
alias .. "cd .."
|
|
alias ... "cd ../.."
|
|
alias .... "cd ../../.."
|
|
|
|
# Git helpers
|
|
alias gst "git status"
|
|
alias glog "git log --oneline --graph --decorate --all"
|
|
alias gd "git diff"
|
|
alias gds "git diff --staged"
|
|
|
|
# Tmux helpers
|
|
alias t "tmux"
|
|
alias ta "tmux attach"
|
|
alias tls "tmux ls"
|
|
alias tn "tmux new -s"
|
|
|
|
# Podman helpers
|
|
alias p "podman"
|
|
alias pc "podman compose"
|
|
{% raw %}
|
|
alias pps "podman ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
|
|
{% endraw %}
|
|
|
|
# System helpers
|
|
alias ports "ss -tulpn"
|
|
alias myip "curl -4 ifconfig.me"
|
|
|
|
# Fish abbreviations
|
|
{% for abbr in cli_fish_abbreviations %}
|
|
abbr --add {{ abbr.name | quote }} {{ abbr.expansion | quote }}
|
|
{% endfor %} |