-
Notifications
You must be signed in to change notification settings - Fork 0
/
.fishrc.fish
98 lines (82 loc) · 2.65 KB
/
.fishrc.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Clear greeting message on startup
set fish_greeting
# Environment variables
# Set english locale
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
set -x EDITOR nvim
set -x PATH $PATH ~/.bin
set -x PATH $PATH ~/.nix-profile/bin
set -x PATH $PATH ~/Code/dotfiles/bin
# Set up secret environment variables
# source ~/.dotfiles/fish/config.secret.fish
# Load nix environment
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
end
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix.sh
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix.sh
end
# Alias for managing config files
alias cfg='git --git-dir=$HOME/Code/dotfiles/ --work-tree=$HOME'
if not set -q abbrs_initialized
set -U abbrs_initialized
abbr vim 'nvim'
abbr d 'docker'
abbr dc 'docker compose'
abbr ga 'git add'
abbr gA 'git add -A :/'
abbr gc 'git checkout'
abbr gC 'git commit'
abbr gAC 'git add -A :/; git commit'
abbr gf 'git fetch'
abbr gp 'git pull --rebase'
abbr gP 'git push -u origin HEAD'
abbr gr 'git rebase'
abbr gs 'git status'
abbr gd 'git -c color.ui=always status -v -v | less -RX'
abbr gl 'git log --oneline --graph'
abbr gb 'git branch'
abbr geach 'git submodule foreach'
abbr grekt 'git reset --hard HEAD'
abbr cd- 'cd -'
abbr y 'yarn'
abbr ys 'yarn start'
abbr yd 'yarn dev'
abbr yb 'yarn build'
abbr l 'la'
abbr c 'code .'
abbr gitclean 'git checkout master; and git fetch -p; and git pull; and git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d; and git fetch --prune'
abbr gu 'git branch -u origin/(git rev-parse --abbrev-ref HEAD)'
end
function tmux_func
if tmux ls | grep -vq attached
tmux attach
else
tmux
end
end
# Use term colors for syntax highlighting
set -u fish_color_normal default
set -u fish_color_param default default
set -u fish_color_comment default
set -u fish_color_autosuggestion default
set -u fish_pager_color_description default
set -u fish_pager_color_progress default
set -u fish_pager_color_secondary default
set -u fish_color_command blue --bold
set -u fish_pager_color_prefix blue --bold --underline
set -u fish_color_user blue
set -u fish_pager_color_completion blue
set -u fish_color_end cyan
set -u fish_color_search_match cyan
set -u fish_color_cwd cyan
set -u fish_color_host cyan
set -u fish_color_operator yellow
set -u fish_color_match yellow
set -u fish_color_escape yellow
set -u fish_color_error red
set -u fish_color_quote green
starship init fish | source
direnv hook fish | source
brew shellenv | source