From a9111488e4945a29b8afa9a4eab12ee2e6fc9a0e Mon Sep 17 00:00:00 2001 From: yleo77 Date: Fri, 17 May 2013 17:48:06 +0800 Subject: [PATCH 1/4] add search by filename and file content feature --- .gitignore | 5 ++--- custom/plugins/sfffe/sfffe.plugin.zsh | 28 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 custom/plugins/sfffe/sfffe.plugin.zsh diff --git a/.gitignore b/.gitignore index 51a5ee6c3..5db11ce5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ locals.zsh log/.zsh_history projects.zsh -custom/* -!custom/example -!custom/example.zsh +custom/example +custom/example.zsh *.swp !custom/example.zshcache cache/ diff --git a/custom/plugins/sfffe/sfffe.plugin.zsh b/custom/plugins/sfffe/sfffe.plugin.zsh new file mode 100644 index 000000000..a0f034908 --- /dev/null +++ b/custom/plugins/sfffe/sfffe.plugin.zsh @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# FILE: sfffe.plugin.zsh +# DESCRIPTION: search file for FE +# AUTHOR: yleo77 (ylep77@gmail.com) +# VERSION: 0.1 +# REQUIRE: ack +# ------------------------------------------------------------------------------ + +if [ ! -x $(which ack) ]; then + echo \'ack\' is not installed! + exit -1 +fi + +ajs() { + ack "$@" --type js +} + +acss() { + ack "$@" --type css +} + +fjs() { + find ./ -name "$@*" -type f | grep '\.js' +} + +fcss() { + find ./ -name "$@*" -type f | grep '\.css' +} From 00848cd8b7347e9b793a2ac6170498e6592dde56 Mon Sep 17 00:00:00 2001 From: yleo77 Date: Wed, 22 May 2013 17:00:08 +0800 Subject: [PATCH 2/4] add gf alias for git flow --- plugins/git-flow/git-flow.plugin.zsh | 3 +++ plugins/git/git.plugin.zsh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh index ab9c0c848..58c31d756 100644 --- a/plugins/git-flow/git-flow.plugin.zsh +++ b/plugins/git-flow/git-flow.plugin.zsh @@ -20,6 +20,9 @@ # c. Or, use this file as a oh-my-zsh plugin. # +#Alias +alias gf='git flow' + _git-flow () { local curcontext="$curcontext" state line diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 6c016aa6b..af0189fdc 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -63,7 +63,10 @@ compdef _git gm=git-merge alias grh='git reset HEAD' alias grhh='git reset HEAD --hard' alias gwc='git whatchanged -p --abbrev-commit --pretty=medium' -alias gf='git ls-files | grep' + +#remove the gf alias +#alias gf='git ls-files | grep' + alias gpoat='git push origin --all && git push origin --tags' # Will cd into the top of the current repository From 6b832b93588567cb00b9a9e8170a5ebf539dea51 Mon Sep 17 00:00:00 2001 From: yleo77 Date: Thu, 6 Jun 2013 12:39:14 +0800 Subject: [PATCH 3/4] add some alias for git flow --- plugins/git-flow/git-flow.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh index 58c31d756..b9ea06844 100644 --- a/plugins/git-flow/git-flow.plugin.zsh +++ b/plugins/git-flow/git-flow.plugin.zsh @@ -22,6 +22,9 @@ #Alias alias gf='git flow' +alias gcd='git checkout develop' +alias gch='git checkout hotfix' +alias gcr='git checkout release' _git-flow () { From 6041e4938cc559b908d83b5664166cc1fd02f31e Mon Sep 17 00:00:00 2001 From: yleo77 Date: Tue, 16 Jul 2013 16:54:54 +0800 Subject: [PATCH 4/4] set default value `--max-count=10` --- plugins/git/git.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 3bdf0c30f..9087a14ea 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -52,9 +52,9 @@ compdef gcount=git alias gcl='git config --list' alias gcp='git cherry-pick' compdef _git gcp=git-cherry-pick -alias glg='git log --stat --max-count=5' +alias glg='git log --stat --max-count=10' compdef _git glg=git-log -alias glgg='git log --graph --max-count=5' +alias glgg='git log --graph --max-count=10' compdef _git glgg=git-log alias glgga='git log --graph --decorate --all' compdef _git glgga=git-log