From 672049523d299c3e423b9157523882eb88724b74 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 6 Jul 2013 15:52:43 +0900 Subject: [PATCH 1/3] update alias _reloadrc --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 4119cae..5ed5616 100755 --- a/bashrc +++ b/bashrc @@ -223,7 +223,7 @@ null type paco && alias pc="sudo \paco -D" alias pycalc="python -i -c 'from math import *' " null type python3 && alias py3=python3 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 sh="ENV=$HOME/.shrc PS1=\$\ PROMPT_COMMAND="" sh" # type trash >/dev/null 2>&1 && alias rm=trash From f0028a21c3887754880ce00e89d37c9ef0137710 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 6 Jul 2013 19:35:32 +0900 Subject: [PATCH 2/3] add new function tx --- bashrc | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/bashrc b/bashrc index 4119cae..dab99d2 100755 --- a/bashrc +++ b/bashrc @@ -473,18 +473,30 @@ input(){ 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 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 to attach." + elif tmux has -t "$1" + then + tmux attach -t "$1" else - command tmux "$@" + tmux new -s "$1" fi } From c048f056172a2f0b23eee322bafa25a312d16a3b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 8 Jul 2013 15:28:30 +0900 Subject: [PATCH 3/3] remove bug --- emacs.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 75ee8ee..d8060cd 100644 --- a/emacs.el +++ b/emacs.el @@ -687,9 +687,7 @@ found, otherwise returns nil." "https://raw.github.com/10sr/emacs-lisp/master/remember-major-modes-mode.el") (require 'remember-major-modes-mode nil t) (remember-major-modes-mode 1) - (add-hook 'after-change-major-mode-hook - 'remember-major-modes-remember)) - + ) ;; Detect file type from shebang and set major-mode. (add-to-list 'interpreter-mode-alist