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
b45e0f48
Unverified
Commit
b45e0f48
authored
Oct 07, 2019
by
Marc Cornellà
Committed by
GitHub
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: simplify completion logic
parent
e0bc6469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
29 deletions
+23
-29
dash.plugin.zsh
plugins/dash/dash.plugin.zsh
+23
-29
No files found.
plugins/dash/dash.plugin.zsh
View file @
b45e0f48
...
...
@@ -35,36 +35,30 @@ _dash() {
if
[[
"
$locator
"
==
"platform"
]]
;
then
# Since these are the only special cases right now, let's not do the
# expensive processing unless we have to
if
[[
"
$keyword
"
==
"python"
||
"
$keyword
"
==
"java"
||
\
"
$keyword
"
==
"qt"
||
"
$keyword
"
==
"cocs2d"
]]
;
then
if
[[
"
$keyword
"
=
(
python|java|qt|cocos2d
)
]]
;
then
docsetName
=
`
echo
$doc
|
grep
-Eo
"docsetName = .*?;"
|
sed
-e
"s/docsetName =
\(
.*
\)
;/
\1
/"
-e
"s/[
\"
:]//g"
`
if
[[
"
$keyword
"
==
"python"
]]
;
then
if
[[
"
$docsetName
"
==
"Python 2"
]]
;
then
keyword
=
"python2"
elif
[[
"
$docsetName
"
==
"Python 3"
]]
;
then
keyword
=
"python3"
fi
elif
[[
"
$keyword
"
==
"java"
]]
;
then
if
[[
"
$docsetName
"
==
"Java SE7"
]]
;
then
keyword
=
"java7"
elif
[[
"
$docsetName
"
==
"Java SE6"
]]
;
then
keyword
=
"java6"
elif
[[
"
$docsetName
"
==
"Java SE8"
]]
;
then
keyword
=
"java8"
fi
elif
[[
"
$keyword
"
==
"qt"
]]
;
then
if
[[
"
$docsetName
"
==
"Qt 5"
]]
;
then
keyword
=
"qt5"
elif
[[
"
$docsetName
"
==
"Qt 4"
]]
;
then
keyword
=
"qt4"
elif
[[
"
$docsetName
"
==
"Qt"
]]
;
then
keyword
=
"qt4"
fi
elif
[[
"
$keyword
"
==
"cocos2d"
]]
;
then
if
[[
"
$docsetName
"
==
"Cocos3D"
]]
;
then
keyword
=
"cocos3d"
fi
fi
case
"
$keyword
"
in
python
)
case
"
$docsetName
"
in
"Python 2"
)
keyword
=
"python2"
;;
"Python 3"
)
keyword
=
"python3"
;;
esac
;;
java
)
case
"
$docsetName
"
in
"Java SE7"
)
keyword
=
"java7"
;;
"Java SE6"
)
keyword
=
"java6"
;;
"Java SE8"
)
keyword
=
"java8"
;;
esac
;;
qt
)
case
"
$docsetName
"
in
"Qt 5"
)
keyword
=
"qt5"
;;
"Qt 4"
|
Qt
)
keyword
=
"qt4"
;;
esac
;;
cocos2d
)
case
"
$docsetName
"
in
Cocos3D
)
keyword
=
"cocos3d"
;;
esac
;;
esac
fi
fi
...
...
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