-
Notifications
You must be signed in to change notification settings - Fork 1
/
.settings
69 lines (53 loc) · 1.5 KB
/
.settings
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
#!/usr/bin/env bash
source "$HOME/.exports"
# Detect and greet remote users
if [[ -n $SSH_CONNECTION ]]; then
>&2 echo "You are now on $(hostname)"
if [ -t 1 ]; then exec fish; fi
fi
# hook shell hooks
eval "$(dirp hook)"
# Legacy bash setup
. ~/.aliases
###
# $PATH setup
#
# IMPORTANT: if you are making
# changes, make sure to call
# the `_setup_fish` function
# from Bash. This will port the
# settings over to the Fish
# global config.
###
P0="./bin"
P1="./node_modules/.bin"
P2="$HOME/.cargo/bin"
P5="$HOME/go/bin"
# todo: move projects out of Dev
P6="$HOME/Dev/emsdk/upstream/emscripten"
P7="$HOME/Dev/wasm-qt/src/bin"
P6="$HOME/Dev/suserpmutil/bin"
P8="$HOME/Dev/fndr"
USER_PATHS="$P0:$P1:$P2:$P5:$P6:$P7:$P8"
# Change MacOS env to resemble a more
# traditional developer environment
os=$(uname -s)
if [[ "$os" == "Darwin" ]]; then
# Prefer brew python over system python
#USER_PATHS="/opt/homebrew/opt/python/libexec/bin:$USER_PATHS"
# Prefer GNU feature set to BSD ones
USER_PATHS="/opt/homebrew/opt/coreutils/libexec/gnubin/:$USER_PATHS"
# Homebrew
USER_PATHS="/opt/homebrew/bin:$USER_PATHS"
# Mirror Linux PATH
USER_PATHS="$HOME/.local/bin:$USER_PATHS"
export MANPATH="/opt/homebrew/opt/coreutils/libexec/gnuman:$MANPATH"
fi
## inject additional dirs
export PATH="$USER_PATHS:$PATH"
function _setup_fish() {
echo -n "Declaring fish_user_paths to be $USER_PATHS... "
fish -c "set -e -U fish_user_paths; set -U fish_user_paths $USER_PATHS \$fish_user_paths"
echo "done"
}
export -f _setup_fish