1 | #!/bin/bash
|
2 |
|
3 |
|
4 | export CLICOLOR=TRUE
|
5 |
|
6 |
|
7 | SOURCE="${BASH_SOURCE[0]}"
|
8 | while [ -h "$SOURCE" ]; do
|
9 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
10 | SOURCE="$(readlink "$SOURCE")"
|
11 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
12 | done
|
13 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
14 |
|
15 | # let's also see if this is running on a TTY
|
16 | TTY="0"
|
17 | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
18 | TTY="1"
|
19 | else
|
20 | case $(ps -o comm= -p $PPID) in
|
21 | sshd|*/sshd) TTY="1";;
|
22 | esac
|
23 | fi
|
24 |
|
25 | # Git completition
|
26 | #
|
27 | # This will enable git completition in terminal, for branches and commands.
|
28 | if [ -f ~/.git-completion.bash ]; then
|
29 | . ~/.git-completion.bash
|
30 | fi
|
31 |
|
32 | # let's ensure the right fonts are available
|
33 | . $DIR/ensure-fonts.sh
|
34 |
|
35 | echo $PS1 > "$DIR/_previous-ps1.bkp"
|
36 |
|
37 | node $DIR/index.js $SOURCE $TTY $HOSTNAME $HOME $IP $SESSION_TYPE
|
38 |
|
39 | source $DIR/exported.sh
|
40 |
|
\ | No newline at end of file |