-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.fish
64 lines (51 loc) · 1.17 KB
/
init.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
#
# Hello Fish Init File
#
#
# Scripts Dirs
#
#
# Add directories here for fish scripts of $HELLO_FISH_HOME
#
# env: environment variables, e.g. alias, PATH
# functions: fish functions
set home_scripts_dirs env functions
#
# Add other path fish scripts here
#
set other_scripts_dirs
# Join two scripts dirs into one variable
set scripts_dirs $HELLO_FISH_HOME/$home_scripts_dirs $other_scripts_dirs
# Load Scripts
for dir in $scripts_dirs
for script in $dir/*.fish
source $script
end
end
#
# Init Scripts for after all settings
#
#
# Add directories here for fish initial scripts of $HELLO_FISH_HOME
#
# inits: initial work for some function, e.g. rvm
set home_inits_dirs inits
#
# Add directories here for other path fish initial scripts
#
set other_inits_dirs
# Join two inits dirs into one variable
set inits_dirs $HELLO_FISH_HOME/$home_inits_dirs $other_inits_dirs
# Platform
if [ -n "$HELLO_FISH_PLATFORM" ]
set target $HELLO_FISH_HOME/platforms/$HELLO_FISH_PLATFORM
if [ -e $target -a -d $target ]
set inits_dirs $inits_dirs $target
end
end
# Load Scripts
for dir in $inits_dirs
for script in $dir/*.fish
source $script
end
end