-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy path.rc
26 lines (22 loc) · 786 Bytes
/
.rc
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
#!bash
#------------------------------------------------------------------------------
#
# This is the `git-hub` initialization script.
#
# This script turns on the `git-hub` Git subcommand, its manpages and TAB
# completion for the *Bash* and *zsh* shells.
#
# Just add a line like this to your shell startup configuration:
#
# source /path/to/git-hub/.rc
#
#------------------------------------------------------------------------------
[[ -n ${ZSH_VERSION-} ]] &&
GIT_HUB_ROOT="$0" ||
GIT_HUB_ROOT="$BASH_SOURCE"
[[ $GIT_HUB_ROOT =~ ^/ ]] ||
GIT_HUB_ROOT="$PWD/$GIT_HUB_ROOT"
export GIT_HUB_ROOT="$(cd "$(dirname $GIT_HUB_ROOT)"; pwd)"
export PATH="$GIT_HUB_ROOT/lib:$PATH"
export MANPATH="$GIT_HUB_ROOT/man:${MANPATH-}"
source "$GIT_HUB_ROOT/share/enable-completion.sh"