From 89bba2cd66b630759fdc702876338b9460f8587b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 15 Jun 2013 18:18:49 +0900 Subject: [PATCH 1/3] bashrc: update reflector function --- bashrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 0e62117..3b5ff0a 100755 --- a/bashrc +++ b/bashrc @@ -238,11 +238,12 @@ null type pacmatic && { _pacman_update_mirrorlist_with_reflector(){ ml=/etc/pacman.d/mirrorlist - cmd="$(expr "$(grep reflector $ml)" : '# With: *\(.*\)')" + cmd="$(expr "$(grep -m 1 reflector $ml)" : '# With: *\(.*\)')" if test -z "$cmd" then - cmd="reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist" + cmd="reflector --verbose -l 5 --sort rate --save $ml" fi + echo "Running $cmd ..." 1>&2 sudo $cmd } null type reflector && test -f /etc/pacman.d/mirrorlist && \ From c61092dfbadc94f91613d86eeb87081d8e9789b2 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 18 Jun 2013 13:22:04 +0900 Subject: [PATCH 2/3] fix my-rgrep --- bashrc | 1 + emacs.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 0e62117..0273c67 100755 --- a/bashrc +++ b/bashrc @@ -284,6 +284,7 @@ then complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \ || complete -o default -o nospace -F _git g fi +git svn --help >/dev/null 2>&1 && alias gsvn="git svn" null type gitmemo && alias m=gitmemo null type gitmemo && alias m=gitmemo diff --git a/emacs.el b/emacs.el index 869e491..9b36a66 100644 --- a/emacs.el +++ b/emacs.el @@ -1828,7 +1828,7 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." (require 'grep) (compilation-start (if (eq 0 (shell-command "git rev-parse --git-dir")) - (format "git --no-pager grep -nH -e '%s'" + (format "git --no-pager -c color.grep=false grep -nH -e '%s'" word) (if (executable-find "ag") (format "ag --nocolor --nogroup --nopager '%s'" From 4e5d12f260d1c6a6c0d5bb42c08bcfd3c83c270f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 19 Jun 2013 18:04:34 +0900 Subject: [PATCH 3/3] emacs.el: add git-command-default-options but not works --- emacs.el | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs.el b/emacs.el index 869e491..ab5aba3 100644 --- a/emacs.el +++ b/emacs.el @@ -715,6 +715,7 @@ found, otherwise returns nil." "https://raw.github.com/10sr/emacs-lisp/master/git-command.el" t) (lazy-load-eval 'git-command) + (setq git-command-default-options "-c color.ui=always") (define-key ctl-x-map "g" 'git-command)) (and (fetch-library