1
0
forked from extern/nix-config
donovanglover-nix-config/dots/common/.config/fish/config.fish
Donovan Glover c332c118d4
Migrate many aliases to abbreviations
This commit gets rid of unused aliases and in general makes everything a
lot cleaner. Since we use abbreviations to memorize the actual commands,
making an .aliases.sh file that supports multiple shells is no longer
needed. If you aren't using fish yet, I highly recommend it.
2018-09-19 19:13:24 -04:00

65 lines
2.4 KiB
Fish

# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
set -U fish_greeting ""
export VISUAL="nvim"
export EDITOR="nvim"
export BROWSER="firefox"
# Use rg instead of ag / ack / grep for fzf (much faster)
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_OPTS='--height 40% --reverse --border --color=16'
# Required to make gpg-agent work in cases like git commit
export GPG_TTY=(tty)
# Always use the default keybindings in fish
fish_default_key_bindings
# Source our aliases
source ~/.aliases.sh
if not set -q set_abbr
set -U set_abbr
abbr g "git"
abbr ga "git add"
abbr gaa "git add --all"
abbr gap "git add --patch"
abbr gb "git branch --verbose" # List all branches
abbr gc "git commit -m"
abbr gca "git commit --amend"
abbr gd "git diff" # Show all file changes not staged yet
abbr gds "git diff --staged" # Show changes staged but not committed
abbr gg "git grep"
abbr gl "git log --oneline --decorate --all --graph -n 10"
abbr gp "git push" # Push your commits to a remote server
abbr gs "git status -s"
abbr gss "git status"
abbr gr "git reset HEAD~" # Undo the last commit but keep changed files
abbr gre "git remote --verbose" # List all remotes
abbr grh "git reset HEAD"
abbr grr "git reset --hard HEAD~" # Remove the last commit and all changes with it
abbr dl "youtube-dl"
abbr back "feh --no-fehbg --bg-fill" # Change the background temporarily
abbr vol "amixer set 'Master' " # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
abbr copy "xclip -sel clip < " # Easily copy the contents of any file
abbr l "ls -l"
abbr t "tree"
abbr f "launch feh --auto-zoom" # Easy image viewing with f
abbr z "launch zathura" # Easy document browsing with z
abbr m "launch mpv" # Easy media playing with m
abbr lium "launch chromium" # Launch chromium separate from the terminal
abbr lfox "launch firefox" # Launch firefox separate from the terminal
end
# Start X at login
if status --is-login
if test -z "$DISPLAY" -a $XDG_VTNR = 1
exec startx -- -keeptty
end
end