summaryrefslogtreecommitdiff
path: root/.config/fish/config.fish
blob: 0ee4928dd5fc810f6f22f5d45620581d63694a85 (plain)
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
#
# getchoo's config.fish
#

function set_envvars
	# source bash profile
	bash2env source "$HOME/.config/shell/profile"

	set -l paths "$HOME/.local/bin" \
		"$HOME/.local/share/nvim/mason/bin"

	# add user directories to path
	for path in $paths
		if test -d $path
			fish_add_path $path
		end
	end
end

function load_plugins
	if not functions -q fisher
		echo 'bootstrapping fisher'
		curl -sL https://git.io/fisher | source && fisher update
	end

	if command -q zoxide
		zoxide init fish | source
	end

	if command -q starship
		starship init fish | source
	end
end

if status is-interactive || status is-login
	load_plugins
	set_envvars
end

set_envvars