summaryrefslogtreecommitdiff
path: root/custom/plugins/sfffe
diff options
context:
space:
mode:
authoryleo77 <ylep77@gmail.com>2013-05-17 17:48:06 +0800
committeryleo77 <ylep77@gmail.com>2013-05-17 17:48:06 +0800
commita9111488e4945a29b8afa9a4eab12ee2e6fc9a0e (patch)
treefe1f5d8027ebd609497e0ad2ed20142745958ccc /custom/plugins/sfffe
parent27c6becffde091cc55e0df70875451ca82867935 (diff)
downloadzsh-a9111488e4945a29b8afa9a4eab12ee2e6fc9a0e.tar.gz
zsh-a9111488e4945a29b8afa9a4eab12ee2e6fc9a0e.tar.bz2
zsh-a9111488e4945a29b8afa9a4eab12ee2e6fc9a0e.zip
add search by filename and file content feature
Diffstat (limited to 'custom/plugins/sfffe')
-rw-r--r--custom/plugins/sfffe/sfffe.plugin.zsh28
1 files changed, 28 insertions, 0 deletions
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'
+}