UNPKG

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