mirror of
https://github.com/flynx/bashctrl.git
synced 2025-10-28 18:30:10 +00:00
Merge branch 'master' of github.com:flynx/bashctrl
This commit is contained in:
commit
c2779adff8
7
bashctrl
Normal file → Executable file
7
bashctrl
Normal file → Executable file
@ -49,7 +49,12 @@ DISABLED_PLUGINS=(
|
||||
#----------------------------------------------------------------------
|
||||
# helpers...
|
||||
|
||||
# when sourcing a script $0 is set to '-bash'...
|
||||
if [ "$0" = "-bash" ] ; then
|
||||
SCRIPT=bashctrl
|
||||
else
|
||||
SCRIPT=`basename $0`
|
||||
fi
|
||||
|
||||
function printhelp(){ cat << EOF
|
||||
Bash control script
|
||||
@ -122,7 +127,7 @@ function update(){
|
||||
|| echo " Generating: $FILE..."
|
||||
{
|
||||
echo "# Lines added/maintained by $SCRIPT:"
|
||||
echo "$SCRIPT run $EVT"
|
||||
echo "source ${BIN_DIR}/${SCRIPT} run $EVT"
|
||||
echo
|
||||
} >> $FILE
|
||||
else
|
||||
|
||||
@ -15,6 +15,9 @@ if [ $1 = "start" ] || [ $1 = 'login' ] ; then
|
||||
alias alias_clear="mv ~/.bash/alias_lst ~/.bash/alias_lst.bak"
|
||||
alias alias_revert="cp ~/.bash/alias_lst.bak ~/.bash/alias_lst"
|
||||
|
||||
[ -e ~/.bash/alias_list ] \
|
||||
&& touch ~/.bash/alias_list
|
||||
|
||||
# external
|
||||
if ! source ~/.bash/alias_lst ; then
|
||||
# defaults
|
||||
|
||||
@ -24,8 +24,7 @@ if [[ $BASH_PROFILE == 1 ]] ; then
|
||||
else
|
||||
PS1='\n\e[32m\u@\h \e[34m$__SHLVL__\e[33m\w\e[0m\n\$ '
|
||||
fi
|
||||
fi
|
||||
if [[ $BASHRC == 1 ]] ; then
|
||||
else
|
||||
if [[ $SHLVL != 1 ]];then
|
||||
__SHLVL__="($SHLVL$__LOGIN_PRESENT__) "
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user