a9111488e4945a29b8afa9a4eab12ee2e6fc9a0e
- Author
- yleo77 <ylep77@gmail.com>
- Committer
- yleo77 <ylep77@gmail.com>
- Date
Message
add search by filename and file content feature
Diff
1diff --git a/.gitignore b/.gitignore
2index 51a5ee6c396f012ae162d0d63006d4d8e765b92f..5db11ce5cbbbb028365b0b50c5fda22bc4f335fa 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,9 +1,8 @@
6 locals.zsh
7 log/.zsh_history
8 projects.zsh
9-custom/*
10-!custom/example
11-!custom/example.zsh
12+custom/example
13+custom/example.zsh
14 *.swp
15 !custom/example.zshcache
16 cache/
17diff --git a/custom/plugins/sfffe/sfffe.plugin.zsh b/custom/plugins/sfffe/sfffe.plugin.zsh
18new file mode 100644
19index 0000000000000000000000000000000000000000..a0f03490815098f8f91ee7a6d68d55135c38363b
20--- /dev/null
21+++ b/custom/plugins/sfffe/sfffe.plugin.zsh
22@@ -0,0 +1,28 @@
23+# ------------------------------------------------------------------------------
24+# FILE: sfffe.plugin.zsh
25+# DESCRIPTION: search file for FE
26+# AUTHOR: yleo77 (ylep77@gmail.com)
27+# VERSION: 0.1
28+# REQUIRE: ack
29+# ------------------------------------------------------------------------------
30+
31+if [ ! -x $(which ack) ]; then
32+ echo \'ack\' is not installed!
33+ exit -1
34+fi
35+
36+ajs() {
37+ ack "$@" --type js
38+}
39+
40+acss() {
41+ ack "$@" --type css
42+}
43+
44+fjs() {
45+ find ./ -name "$@*" -type f | grep '\.js'
46+}
47+
48+fcss() {
49+ find ./ -name "$@*" -type f | grep '\.css'
50+}