-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.fish
68 lines (51 loc) · 1.14 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
###
# Path
###
# Local scripts
set PATH $HOME/bin $PATH
# Homebrew
# set PATH /usr/local/bin /usr/local/sbin $PATH
# Go
# set PATH /usr/local/opt/go/libexec/bin $PATH
# set PATH /usr/local/go/bin $PATH
# set -x GOPATH /usr/local/go
# Composer
# set PATH $HOME/.composer/vendor/bin $PATH
# Done
set -x PATH $PATH
###
# rbenv
# https://github.com/rbenv/rbenv
###
status --is-interactive; and . (rbenv init -|psub)
###
# Fuck
# https://github.com/nvbn/thefuck
###
thefuck --alias | source
###
# nvm
###
nvm use default
function __check_nvm --on-variable PWD --description 'Detect node version'
if test -f .nvmrc
set node_version (nvm version)
set nvmrc_node_version (nvm version (cat .nvmrc))
if [ $nvmrc_node_version = "N/A" ]
nvm install
else if [ $nvmrc_node_version != $node_version ]
nvm use
end
set -gx X_NVM_DIRTY_FLAG 1
else if set -q X_NVM_DIRTY_FLAG; and [ (node --version) != (nvm version default) ]
nvm use default
set -e X_NVM_DIRTY_FLAG
end
end
__check_nvm
###
# Theme (bobthefish)
# https://github.com/oh-my-fish/theme-bobthefish
###
set -g theme_display_ruby no
set -g theme_nerd_fonts yes