dotfiles-ansible/roles/config/templates/fish/aliases.j2

49 lines
1.1 KiB
Django/Jinja

# DevOps life
abbr ap ansible-playbook
abbr ad ansible-doc
abbr av ansible-vault
abbr h helm
abbr hf helmfile
abbr k kubectl
abbr kx kubectx
abbr kn kubens
abbr t terraform
# remap
alias cp 'cp -vir'
alias mv 'mv -vi'
alias rm 'rm -vr'
alias mkdir 'mkdir -vp'
{% if multiplexer == 'tmux' %}
# true color in tmux pane
abbr tmux 'TERM=screen-256color command tmux'
{% endif %}
# neovim
abbr v nvim
abbr vv 'fzf --prompt "Edit files: " --preview "$HOME/.local/libexec/preview {} 2>/dev/null" | xargs -r nvim'
# emacs
abbr e 'emacs -nw'
abbr em 'emacsclient -c -a "emacs"'
# rsync
abbr rsyncdir 'rsync -avP --delete-after'
# yt-dlp
abbr yoump3 'yt-dlp --extract-audio --audio-format mp3 --embed-thumbnail --audio-quality 0'
abbr youflac 'yt-dlp --extract-audio --audio-format flac --audio-quality 0'
abbr youlist 'yt-dlp --yes-playlist'
# Lazy cd-ing
function .. ; cd .. ; end
function ... ; cd ../.. ; end
function .... ; cd ../../.. ; end
# Create directory path and cd into it
function mkcd; mkdir -p $argv; cd $argv; end
# Create file, recursively creating directories as needed
function mktouch; mkdir -p (dirname $argv); touch $argv; end