-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.fish
107 lines (86 loc) · 2.15 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
set fish_greeting ""
set MC_SKIN $HOME/dotfiles/mc_solarized_light.ini
set HOMEBREW_NO_ENV_HINTS 1
set EDITOR (which vim)
function free-space
sudo apt-get autoremove
brew cleanup
rm -rf ~/Downloads/tmp/*
rm -rf /tmp/*
rvm cleanup all
npm cache clear
yarn cache clean
end
function localnet
nmap -sn 192.168.1.0/24 -oG - | awk '/Up$/{print $2}'
end
function words
vim -c 'execute ":WikiJournal" | :Goyo'
end
function wiki
vim -c 'execute ":WikiIndex"'
end
function links
vim ~/Nextcloud/wiki/links/(date +%Y.%m.%d).md -c ':AutoSaveToggle'
end
function gprom
git pull --rebase origin main
end
function gprot
git pull --rebase origin trunk
end
function gprod
git pull --rebase origin develop
end
function ...
../..
end
function ud
pushd .
cd ..
popd
end
function pbedit
pbpaste | vipe | pbcopy
end
function public-ip
curl icanhazip.com
end
function my-ip
ifconfig | grep "inet " | grep -i mask | grep -v 127.0.0.1 | perl -pe 's/^\s+//' | cut -d ' ' -f2 | sed 's/addr://'
end
# https://github.com/gsamokovarov/.files/blob/master/.config/fish/aliases.fish
abbr -a be bundle exec
abbr mkdir "mkdir -p"
abbr cdd "cd ~/dotfiles"
abbr cdg "cd ~/github"
abbr cddm "cd ~/github/deanmarano/"
abbr cdra "cd ~/github/deanmarano/recipes-api"
abbr cdru "cd ~/github/deanmarano/recipes-ui"
abbr -a vi vim
abbr -a bb "cd ~/dotfiles; and brew bundle; and cd -;"
abbr kaboom "rm -rf node_modules tmp dist; and npm install"
abbr -a gcp "git cherry-pick"
# http://transit.iut2.upmf-grenoble.fr/doc/kitty/html/kittens/icat.html
alias icat="kitty +kitten icat"
# https://github.com/fish-shell/fish-shell/issues/1363
function nohist
set -l prefix $HOME/.config
set -l path fish/fish_history
if set -q XDG_CONFIG_HOME
set prefix $XDG_CONFIG_HOME
end
if test -f $prefix/$path.copy
mv $prefix/$path.copy $prefix/$path
else
cp -f $prefix/$path $prefix/$path.copy
echo y | history --clear > /dev/null
end
end
# Auto-install asdf from source
if test -e ~/.asdf/asdf.fish
source ~/.asdf/asdf.fish
else
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
source ~/.asdf/asdf.fish
end