Browse Source

fix alias _reloadrc

pull/1/head
10sr 11 years ago
parent
commit
32facd6c40
2 changed files with 9 additions and 1 deletions
  1. +1
    -0
      setup.sh
  2. +8
    -1
      shrc

+ 1
- 0
setup.sh View File

@@ -22,6 +22,7 @@ gen_common(){
__iswindows=false
__isdarwin=false
__islinux=false
# $OSTYPE is another choice. which is better?
case `uname` in
(MINGW*) __ismsys=true ;;
(CYGWIN*) __iscygwin=true ;;


+ 8
- 1
shrc View File

@@ -329,7 +329,14 @@ __safe_alias pc="sudo \paco -D"
alias pycalc="python -i -c 'from math import *' "
__safe_alias py3=python3
__safe_alias py2=python2
alias _reloadrc="exec \"$SHELL\""
# SHELL cannot be used. for example, run bash inside zsh, SHELL is set to be
# /bin/zsh
if $inbash
then
alias _reloadrc="exec bash"
elif $inzsh
alias _reloadrc="exec zsh"
fi
# alias mytime="date +%Y%m%d-%H%M%S"
alias sh="ENV=$HOME/.shrc PS1=\$\ PROMPT_COMMAND="" sh"
# type trash >/dev/null 2>&1 && alias rm=trash


Loading…
Cancel
Save