-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile
More file actions
35 lines (27 loc) · 816 Bytes
/
Copy pathprofile
File metadata and controls
35 lines (27 loc) · 816 Bytes
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
#!/usr/bin/env bash
export DOT_FILES_DIR="$HOME/.hiren"
source "$DOT_FILES_DIR/sh_utils.sh"
DOT_FILES_ENV="$(cat "$DOT_FILES_DIR/env-context")"
export DOT_FILES_ENV
if [ -x '/opt/homebrew/bin/brew' ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x '/usr/local/bin/brew' ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
source "$DOT_FILES_DIR/configs/all.sh"
if command_exists nvim; then
EDITOR="$(which nvim)"
elif [ -x '/usr/local/bin/nvim' ]; then
EDITOR='/usr/local/bin/nvim'
elif [ -x '/opt/homebrew/bin/nvim' ]; then
EDITOR='/opt/homebrew/bin/nvim'
else
EDITOR="$(which vim)"
fi
export EDITOR
if [ -n "$DOT_FILES_ENV" ]; then
if [ -d "$DOT_FILES_DIR/$DOT_FILES_ENV/bin" ]; then
export PATH="$DOT_FILES_DIR/$DOT_FILES_ENV/bin:$PATH"
fi
fi
export HIREN_PROFILE_SOURCED=true