|
@@ -223,7 +223,7 @@ null type paco && alias pc="sudo \paco -D" |
|
|
alias pycalc="python -i -c 'from math import *' " |
|
|
alias pycalc="python -i -c 'from math import *' " |
|
|
null type python3 && alias py3=python3 |
|
|
null type python3 && alias py3=python3 |
|
|
null type python2 && alias py2=python2 |
|
|
null type python2 && alias py2=python2 |
|
|
alias _reloadrc="test -f ~/.bashrc && source ~/.bashrc" |
|
|
|
|
|
|
|
|
alias _reloadrc="exec \"$SHELL\"" |
|
|
# alias mytime="date +%Y%m%d-%H%M%S" |
|
|
# alias mytime="date +%Y%m%d-%H%M%S" |
|
|
alias sh="ENV=$HOME/.shrc PS1=\$\ PROMPT_COMMAND="" sh" |
|
|
alias sh="ENV=$HOME/.shrc PS1=\$\ PROMPT_COMMAND="" sh" |
|
|
# type trash >/dev/null 2>&1 && alias rm=trash |
|
|
# type trash >/dev/null 2>&1 && alias rm=trash |
|
@@ -478,18 +478,30 @@ input(){ |
|
|
echo $foo |
|
|
echo $foo |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
tmux(){ |
|
|
|
|
|
|
|
|
# tmux(){ |
|
|
|
|
|
# if test $# -eq 0 |
|
|
|
|
|
# then |
|
|
|
|
|
# (cd ~; command tmux start;) |
|
|
|
|
|
# if command tmux has -t main |
|
|
|
|
|
# then |
|
|
|
|
|
# command tmux attach -t main |
|
|
|
|
|
# else |
|
|
|
|
|
# (cd ~; command tmux new -s main;) |
|
|
|
|
|
# fi |
|
|
|
|
|
# else |
|
|
|
|
|
# command tmux "$@" |
|
|
|
|
|
# fi |
|
|
|
|
|
# } |
|
|
|
|
|
tx(){ |
|
|
if test $# -eq 0 |
|
|
if test $# -eq 0 |
|
|
then |
|
|
then |
|
|
(cd ~; command tmux start;) |
|
|
|
|
|
if command tmux has -t main |
|
|
|
|
|
then |
|
|
|
|
|
command tmux attach -t main |
|
|
|
|
|
else |
|
|
|
|
|
(cd ~; command tmux new -s main;) |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
tmux ls |
|
|
|
|
|
echo "tx <session> to attach." |
|
|
|
|
|
elif tmux has -t "$1" |
|
|
|
|
|
then |
|
|
|
|
|
tmux attach -t "$1" |
|
|
else |
|
|
else |
|
|
command tmux "$@" |
|
|
|
|
|
|
|
|
tmux new -s "$1" |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|