Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Adding support for .bash_profile #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interaction:
work tree dirty indicator.
* Customizable via `/etc/gitshrc` and `~/.gitshrc` config files;
for creating aliases, changing the prompt, etc.
* Runs on top of normal bash (`~/.bashrc`) and
* Runs on top of normal bash (`~/.bash_profile`) and
readline (`~/.inputrc`) configurations.

Installation
Expand Down Expand Up @@ -56,7 +56,7 @@ used as top-level commands:
new!mygreatrepo> rebase -i HEAD~10

It's really just a normal bash shell, though, so all commands on `PATH` and any
aliases defined in `~/.bashrc` are also available:
aliases defined in `~/.bash_profile` are also available:

new!mygreatrepo> ls -l
new!mygreatrepo> vim somefile
Expand Down Expand Up @@ -99,7 +99,7 @@ files (`~/.gitconfig` and `/etc/gitconfig`) either by hand or using
The `/etc/gitshrc` and `~/.gitshrc` files are sourced (in that order)
immediately before the shell becomes interactive.

The `~/.bashrc` file is sourced before either `/etc/gitshrc` or `~/.gitshrc`.
The `~/.bash_profile` file is sourced before either `/etc/gitshrc` or `~/.gitshrc`.
Any bash customizations defined there and not explicitly overridden by `git-sh`
are also available.

Expand Down
2 changes: 1 addition & 1 deletion git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# To use these routines:
#
# 1) Copy this file to somewhere (e.g. ~/.git-completion.sh).
# 2) Added the following line to your .bashrc:
# 2) Added the following line to your .bash_profile:
# source ~/.git-completion.sh
#
# 3) Consider changing your PS1 to also show the current branch:
Expand Down
2 changes: 1 addition & 1 deletion git-sh.1.roff
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ The \fB/etc/gitshrc\fR and \fB~/.gitshrc\fR files are sourced (in that order)
immediately before the shell becomes interactive.
.
.P
The \fB~/.bashrc\fR file is sourced before either \fB/etc/gitshrc\fR or \fB~/.gitshrc\fR.
The \fB~/.bash_profile\fR file is sourced before either \fB/etc/gitshrc\fR or \fB~/.gitshrc\fR.
Any bash customizations defined there and not explicitly overridden by \fBgit\-sh\fR
are also available.
.
Expand Down
2 changes: 1 addition & 1 deletion git-sh.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ files (`~/.gitconfig` and `/etc/gitconfig`) either by hand or using
The `/etc/gitshrc` and `~/.gitshrc` files are sourced (in that order)
immediately before the shell becomes interactive.

The `~/.bashrc` file is sourced before either `/etc/gitshrc` or `~/.gitshrc`.
The `~/.bash_profile` file is sourced before either `/etc/gitshrc` or `~/.gitshrc`.
Any bash customizations defined there and not explicitly overridden by `git-sh`
are also available.

Expand Down
7 changes: 4 additions & 3 deletions git-sh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
[ "$0" = 'bash' ] ||
exec /usr/bin/env bash --rcfile "$0" "$@"

# source the user's .bashrc file
[ -r ~/.bashrc ] && {
# source the user's .bash_profile file
[ -r ~/.bash_profile ] && {
pushd ~ > /dev/null
. .bashrc
. .bash_profile
popd > /dev/null
}

Expand Down Expand Up @@ -98,6 +98,7 @@ _git_cmd_cfg=(
'diff alias stdcmpl'
'difftool alias'
'fetch alias stdcmpl'
'flow alias'
'format-patch alias stdcmpl'
'fsck alias'
'gc alias stdcmpl'
Expand Down