-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.fish
63 lines (55 loc) · 1.19 KB
/
config.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function git_branch
git branch | sed -n '/\* /s///p'
end
# ENV variables
export EDITOR=emacs
export GIT_EDITOR=vim
export PROJECTS=$HOME/projects
export SCRIPTS=$PROJECTS/snippets/shell
# Shortcuts
abbr vim "nvim"
abbr r "ranger"
abbr gw "./gradlew"
abbr ls "ls -N --color"
abbr ll "ls -laho"
abbr l "ls -l"
abbr _ "sudo"
# Git shortcuts
abbr gst "git status"
abbr gd "git diff"
abbr gl "git pull"
abbr gf "git fetch"
abbr gp "git push"
abbr gpf "git push --force-with-lease"
abbr gco "git checkout"
abbr gcb "git checkout -b"
abbr ga "git add"
abbr gaa "git add --all"
abbr gc "git commit --verbose"
abbr gcl "git clone --recurse-submodules"
alias gc! "git commit --verbose --amend"
alias gpsup "git push --set-upstream origin $(git_branch)"
# Scripts
abbr volume "sh $SCRIPTS/volume.sh"
# asdf
source /opt/asdf-vm/asdf.fish
# GPG
export GPG_TTY=(tty)
function fish_prompt
if test $status -eq 0
set_color green
else
set_color red
end
echo -n "λ "
set_color yellow
echo -n (whoami) " "
set_color purple
echo -n "["(prompt_pwd)"] "
if test -d .git
set_color blue
echo -n (fish_git_prompt)
end
set_color cyan
echo -n " → "
end