From 1dbd39b0f5465238f8fc218207b460f379dd987d Mon Sep 17 00:00:00 2001 From: hophacker Date: Sat, 17 Jun 2017 16:43:56 +0800 Subject: [PATCH] recursive_replace with find, gitconfig removed --- .gitignore | 1 + git/{gitconfig => gitconfig_template} | 3 --- zsh/functions.zsh | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) rename git/{gitconfig => gitconfig_template} (98%) diff --git a/.gitignore b/.gitignore index 0e06adc..b110f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ vim/sessions bin/subl tags .idea +git/gitconfig diff --git a/git/gitconfig b/git/gitconfig_template similarity index 98% rename from git/gitconfig rename to git/gitconfig_template index 10e84ca..fd2f262 100644 --- a/git/gitconfig +++ b/git/gitconfig_template @@ -127,6 +127,3 @@ enabled = true [include] path = .gitconfig.user -[user] - email = j@rallets.com - name = Jie Feng diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 2b8bb5d..c1d3b60 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -144,7 +144,7 @@ function recursive_replace { echo "recursive_replace \"FILE_PATTERN\" BEFORE AFTER" return fi - find . -type f -name $1 -print0 | xargs -0 sed -i "s/$2/$3/g" + find -iregex $1 -print0 | xargs -0 sed -i "s/$2/$3/g" } function git-change-module-remote() { git config --file=.gitmodules submodule.$1.url $2