-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.fish
152 lines (120 loc) · 3.31 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
set -g __fish_git_prompt_show_informative_status 0
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_color_branch magenta
set -g __fish_git_prompt_showupstream informative
set -g __fish_git_prompt_char_upstream_ahead "↑"
set -g __fish_git_prompt_char_upstream_behind "↓"
set -g __fish_git_prompt_char_upstream_prefix ""
set -g __fish_git_prompt_char_stagedstate "●"
set -g __fish_git_prompt_char_dirtystate "✚"
set -g __fish_git_prompt_char_untrackedfiles "…"
set -g __fish_git_prompt_char_conflictedstate "✖"
set -g __fish_git_prompt_char_cleanstate "✔"
set -g __fish_git_prompt_color_dirtystate blue
set -g __fish_git_prompt_color_stagedstate yellow
set -g __fish_git_prompt_color_invalidstate red
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
set -g __fish_git_prompt_color_cleanstate green
alias cat="bat"
function nv
nvim
end
function fix
git commit --fixup HEAD
end
function fp
git push -f
end
function gp
git pull
end
function am
git commit --amend --no-edit
end
function cover
open coverage/index.html
end
function s
git status
end
function gl
git log
end
function glo
git log --oneline
end
function vimlog
git log | nvim -R -
end
function stash
git stash
end
function apply
git stash apply
end
function lsd
ls -d */
end
function dockerize
docker run --rm -it -v $PWD:$PWD -w $PWD ubuntu bash
end
function vlc
nvim -O (git log --pretty=format: --name-only -n 1)
end
function gsup
set BRANCH (git rev-parse --abbrev-ref HEAD 2>/dev/null)
git push --set-upstream origin $BRANCH
end
function gpr
gsup
git pull-request -o -c
end
function mydiff
GIT_EXTERNAL_DIFF=difft git log -p --ext-diff
end
function rebase
set stash_ref (git stash create)
git restore .
git checkout main
git pull
git checkout -
git rebase main
if [ "$stash_ref" != "" ]
git stash apply "$stash_ref"
end
end
function fish_prompt
set_color FF0
echo '│' (pwd) '>'
echo -n '│ '
set_color normal
end
function fish_greeting
set_color purple
echo
echo "W̶̥̫̥͆ḛ̸̥̿ͅḽ̵̻͓̋̀͝c̶͙͈̗͛̐̀̏o̵̿̈́̄̉̚͜m̴̼̟̘̼̓ẹ̶̡͔͂̉̊̃͜͝ ̷̛̯̯̏Ḫ̵̣̫͒̽ó̵̯̽̕m̴̯̚e̷̺̝̦͒͋́͑:" (date)
echo
end
# tte slide is very slow unfortunately, so this is annoying
# when frequently opening terminals
#function fish_greeting
#set_color purple
#echo
#echo "W̶̥̫̥͆ḛ̸̥̿ͅḽ̵̻͓̋̀͝c̶͙͈̗͛̐̀̏o̵̿̈́̄̉̚͜m̴̼̟̘̼̓ẹ̶̡͔͂̉̊̃͜͝ ̷̛̯̯̏Ḫ̵̣̫͒̽ó̵̯̽̕m̴̯̚e̷̺̝̦͒͋́͑:" (date)
#echo
#echo "
#__..--''``---....___ _..._ __
#/// //_.-' .-/\"; ` ``<._ ``.''_ `. / // /
#///_.-' _..--.'_ \ `( ) ) // //
#/ (_..-' // (< _ ;_..__ ; `' / ///
#/ // // // `-._,_)' // / ``--...____..-' /// / //
#" | tte slide
#end
set PATH /usr/local/opt/gnu-sed/libexec/gnubin:$PATH
set PATH $HOME/.cargo/bin $PATH
fish_add_path ./node_modules/.bin
# Setting PATH for Python 3.9
# The original version is saved in /Users/pflockhart/.config/fish/config.fish.pysave
set -x PATH "/Library/Frameworks/Python.framework/Versions/3.9/bin" "$PATH"
# Created by `pipx` on 2024-05-29 19:21:24
set PATH $PATH /Users/peterflockhart/.local/bin