Add zsh/oh my zsh/w10k
This commit is contained in:
17
zsh/.oh-my-zsh/plugins/sfffe/README.md
Normal file
17
zsh/.oh-my-zsh/plugins/sfffe/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# "Search files for Front-End"
|
||||
|
||||
This plugin adds a few functions for searching files used in Front-End web development.
|
||||
|
||||
To use it, add `sfffe` to the plugins array in your zshrc file:
|
||||
```zsh
|
||||
plugins=(... sfffe)
|
||||
```
|
||||
|
||||
**Requires:** `ack`
|
||||
|
||||
## Functions
|
||||
|
||||
- `ajs`: look for string in `.js` files.
|
||||
- `acss`: look for string in `.css` files.
|
||||
- `fjs`: search for `.js` files under the current working directory.
|
||||
- `fcss`: search for `.css` files under the current working directory.
|
28
zsh/.oh-my-zsh/plugins/sfffe/sfffe.plugin.zsh
Normal file
28
zsh/.oh-my-zsh/plugins/sfffe/sfffe.plugin.zsh
Normal file
@ -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'
|
||||
}
|
Reference in New Issue
Block a user