-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.fish.symlink
62 lines (51 loc) · 1.52 KB
/
config.fish.symlink
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
# Set lang
set -xU LANG en_US.UTF-8
set -xU LC_ALL en_US.UTF-8
# Remove greeting
set fish_greeting
# Set path for Coreutils
fish_add_path /usr/local/opt/coreutils/libexec/gnubin /usr/local/opt/coreutils/libexec/gnuman
fish_add_path /usr/local/opt/findutils/libexec/gnubin
fish_add_path /usr/local/opt/openvpn/sbin
# Source custom scripts
if test -e $HOME/.config/fish/custom
source $HOME/.config/fish/custom/*.fish
end
# Source secret envs :)
if test -e $HOME/.config/fish/secret.fish
source $HOME/.config/fish/secret.fish
end
if status is-interactive
# lang imports
if test -d $HOME/.jenv
source (jenv init -|psub)
end
if test -d $HOME/.pyenv
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin
source (pyenv init -|psub)
end
set -gx GOPATH $HOME
# Make Vim default editor
set -xU EDITOR vim
# functions
function wifi-password-finder
security find-generic-password -gwa $1
end
function generate-new-mac-address
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig $1 ether
end
function global-search-replace
ack $1 -l --print0 | xargs -0 sed -i '' "s/$1/$2/g"
end
function awsume
assume-role $argv | sed 's/^export/set -x --global/' | sed 's/=/ /' | source
end
# aliases
alias g="git"
alias wifi-password-for-network=wifi-password-finder
alias d="docker"
alias k="kubectl"
alias tf="terraform"
alias gh="open (git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#http://#' -e 's@com:@com/@')| head -n1"
end