Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
ff706f3e
Commit
ff706f3e
authored
10 years ago
by
willmendesneto
Committed by
Marc Cornellà
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "help" method in "frontend-search" plugin
parent
f1472f1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
README.md
plugins/frontend-search/README.md
+8
-1
frontend-search.plugin.zsh
plugins/frontend-search/frontend-search.plugin.zsh
+24
-2
No files found.
plugins/frontend-search/README.md
View file @
ff706f3e
...
...
@@ -17,9 +17,16 @@ plugins=( <your-plugins-list>... frontend-search)
## Commands ##
All command searches are accept only in format
All command searches are accept only in format
s
*
`frontend <search-content> <search-term>`
*
`<search-content> <search-term>`
For more informations, please run help command (are similars)
*
`frontend -h`
*
`frontend --help`
*
`frontend help`
The search content are
...
...
This diff is collapsed.
Click to expand it.
plugins/frontend-search/frontend-search.plugin.zsh
View file @
ff706f3e
...
...
@@ -29,14 +29,36 @@ function frontend() {
unheap
'http://www.unheap.com/?s='
)
# show help for commands list
if
[[
$1
=
~
'(help|--help|-h)'
]]
then
echo
"Usage:"
echo
"
\n\t
frontend <search-content>
\n\t
<search-content>
\n\t
frontend <search-content> <search-term>"
echo
""
echo
"Where <search-content> is one of:"
echo
"jquery, mdn, compass, html5please, caniuse, aurajs, dartlang, qunit, fontello,"
echo
"bootsnipp, cssflow, codepen, unheap, bem, smacss, angularjs, reactjs, emberjs"
echo
"help"
echo
""
echo
"Where <search-term> is a term to search in allowed repositories"
echo
""
echo
"frontend --help show plugin help"
echo
"frontend -h show plugin help"
echo
""
echo
"It is allowed to directly access all search contents."
echo
""
return
1
fi
# no keyword provided, simply show how call methods
if
[[
$#
-le
1
]]
;
then
if
[[
$#
-le
1
]]
then
echo
"Please provide a search-content and a search-term for app.
\n
Ex:
\n
frontend <search-content> <search-term>
\n
"
return
1
fi
# check whether the search engine is supported
if
[[
-z
"
$urls
[
$1
]"
]]
;
then
if
[[
-z
"
$urls
[
$1
]"
]]
then
echo
"Search valid search content
$1
not supported."
echo
"Valid contents: (formats 'frontend <search-content>' or '<search-content>')"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment