From 278c66793db7978c49c6eb576bc0013238355700 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 19 Sep 2012 23:56:39 +0900 Subject: [PATCH 1/8] do not export PROMPT_COMMAND --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index fdcdd93..d137061 100755 --- a/bashrc +++ b/bashrc @@ -630,7 +630,7 @@ __my_set_title(){ ;; esac } -export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD}" +PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD}" # copied from https://wiki.archlinux.org/index.php/X_resources invader(){ From 5c2458e9cd0323029faf3ab5889551ac6f39a887 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 20 Sep 2012 20:20:15 +0900 Subject: [PATCH 2/8] i wonder if in tmux.conf -g options do not need to be added --- tmux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/tmux.conf b/tmux.conf index 90c10d7..1f4dfdf 100644 --- a/tmux.conf +++ b/tmux.conf @@ -6,6 +6,7 @@ bind-key C-z send-prefix bind-key C command-prompt "new-window '%%'" setw -g mode-keys vi +set -g base-index 1 set -g default-command /bin/bash #set -g default-terminal screen-256color From 9b677153a133ad5c341c504435db6a8926e6f48b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 24 Sep 2012 11:03:33 +0900 Subject: [PATCH 3/8] fix ip-address --- bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index fdcdd93..820a29d 100755 --- a/bashrc +++ b/bashrc @@ -548,8 +548,8 @@ __my_battery_status(){ alias bat='__my_battery_status %s\\n' ip-address(){ - test type ifconfig >/dev/null 2>&1 || return 1 - local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}') + type ip >/dev/null 2>&1 || return 1 + local ip=$(LANG=C ip addr show scope global | \grep --color=never --only-matching 'inet [^ ]*' | cut -d " " -f 2) test -n "$ip" && printf $1 $ip } From fcc7edabefe2ffa169d68193b1e7ae68caea03ef Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 24 Sep 2012 13:39:58 +0900 Subject: [PATCH 4/8] load git-prompt.sh more surely --- bashrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 3bd6694..531b219 100755 --- a/bashrc +++ b/bashrc @@ -570,7 +570,11 @@ __my_ps1_moc(){ __my_moc_state "[MOC:%s]" return $last } -test -r /usr/share/git/git-prompt.sh && . /usr/share/git/git-prompt.sh +for f in /usr/share/git/git-prompt.sh \ + /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh +do + test -r $f && . $f && break +done GIT_PS1_SHOWDIRTYSTATE=t GIT_PS1_SHOWUPSTREAM=t __my_ps1_git(){ From b65daa77bb7e8fc307c333a23e93d1f4e7d39718 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 24 Sep 2012 14:56:31 +0900 Subject: [PATCH 5/8] fix bug on dh --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 531b219..62d130c 100755 --- a/bashrc +++ b/bashrc @@ -268,7 +268,7 @@ dh(){ then dirs -v -l else - local dir="$(dirs -v -l | \grep "^ *$1 \+" | sed "s/^ *[0-9]\+ *//g")" + local dir="$(dirs -v -l | \grep "^ *$1 \+" | sed "s/^ *[0-9]* *//g")" cd "$dir" fi } From 02bcdbaeeab240ef2c7dd9df95f5f10efa5d39bb Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 24 Sep 2012 21:00:52 +0900 Subject: [PATCH 6/8] add env PYTHONPATH --- profile | 1 + 1 file changed, 1 insertion(+) diff --git a/profile b/profile index f828c76..066dd31 100755 --- a/profile +++ b/profile @@ -8,6 +8,7 @@ export TERMCAP="${TERMCAP}:vb=" export HOSTNAME export ENV=~/.shrc export PYTHONDOCS=/usr/share/doc/python/html/ +export PYTHONPATH="${PYTHONPATH}:${HOME}/my/bin/py" test -f "${HOME}/.pythonrc" && export PYTHONSTARTUP="${HOME}/.pythonrc" #export PYTHONPATH="~/.local/share/lib/python3.2/site-packages" From 428998de1ac5537ae3f932ee3af8acbb8273b89f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 27 Sep 2012 16:04:37 +0900 Subject: [PATCH 7/8] add __pycache__/ to gitignore --- gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/gitignore b/gitignore index bcf74c8..9aa7e52 100644 --- a/gitignore +++ b/gitignore @@ -1,6 +1,7 @@ \#* *~ .DS_Store +__pycache__/ # gnu global GPATH From 21b818f09cc83a33e021c0a22541877b2d064930 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 27 Sep 2012 16:11:03 +0900 Subject: [PATCH 8/8] add gnu global aliases --- bashrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bashrc b/bashrc index 62d130c..f0d7fff 100755 --- a/bashrc +++ b/bashrc @@ -139,6 +139,8 @@ alias mpg123="mpg123 -C -v --title" export PLAYER="mpg123 -C -v --title" alias screen="screen -e^z^z" alias zcd="cd \`zenity --file-selection --directory\`" +alias gtags="gtags -v" +alias htags="htags -ansx" alias pad=notepad null type gedit && alias pad=gedit