Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
00701642
Commit
00701642
authored
Aug 29, 2015
by
Sheldon Els
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
info command
to easily see from commandline what each package does via their descriptions on github
parent
6500abd0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
15 deletions
+44
-15
pkg/omf/cli/omf.describe.fish
pkg/omf/cli/omf.describe.fish
+17
-0
pkg/omf/cli/omf.help.fish
pkg/omf/cli/omf.help.fish
+1
-0
pkg/omf/completions/omf.fish
pkg/omf/completions/omf.fish
+19
-15
pkg/omf/omf.fish
pkg/omf/omf.fish
+7
-0
No files found.
pkg/omf/cli/omf.describe.fish
0 → 100644
View file @
00701642
function omf.describe -a name
if test (count $argv) -eq 0
for package in (omf.list_db_packages)
echo $package - (omf.describe $package)
end
else
set package_path $OMF_PATH/db/pkg/$name
if test -e $package_path
set url (cat $package_path)
set repo (basename (dirname $url))/(basename $url)
curl -s https://api.github.com/repos/$repo | ruby -rjson -e 'j = JSON.parse(ARGF.read); puts j["description"]'
else
echo (omf::err)"$name is not a valid pkg."(omf::off) 1^&2
return $OMF_INVALID_ARG
end
end
end
pkg/omf/cli/omf.help.fish
View file @
00701642
...
@@ -5,6 +5,7 @@ function omf.help
...
@@ -5,6 +5,7 @@ function omf.help
"(omf::dim)"Actions"(omf::off)"
"(omf::dim)"Actions"(omf::off)"
"(omf::em)"l"(omf::off)"ist List local packages.
"(omf::em)"l"(omf::off)"ist List local packages.
"(omf::em)"d"(omf::off)"escribe Get information about what packages do.
"(omf::em)"i"(omf::off)"nstall Install one or more packages.
"(omf::em)"i"(omf::off)"nstall Install one or more packages.
"(omf::em)"t"(omf::off)"heme List / Use themes.
"(omf::em)"t"(omf::off)"heme List / Use themes.
"(omf::em)"r"(omf::off)"emove Remove a theme or package.
"(omf::em)"r"(omf::off)"emove Remove a theme or package.
...
...
pkg/omf/completions/omf.fish
View file @
00701642
...
@@ -12,19 +12,23 @@ end
...
@@ -12,19 +12,23 @@ end
complete --no-files -c omf -d "Oh My Fish"
complete --no-files -c omf -d "Oh My Fish"
complete -c omf -n "__omf.opt_is q query" -a (printf "%s " (set | awk '{ printf $1"\n"; }'))
complete -c omf -n "__omf.opt_is q query" -a (printf "%s " (set | awk '{ printf $1"\n"; }'))
complete -c omf -n "__omf.opt_is r rm remove" -a (printf "%s " (omf.list_local_packages) (omf.list_installed_themes))
complete -c omf -n "__omf.opt_is r rm remove" -a (printf "%s " (omf.list_local_packages) (omf.list_installed_themes))
complete -c omf -n "__omf.opt_is i install" -a (printf "%s " (omf.list_db_packages))
complete -c omf -n "__omf.opt_is d desc describe" -a (printf "%s " (omf.list_db_packages))
complete -c omf -n "__omf.opt_is t theme" -a (printf "%s " (omf.list_themes))
complete -c omf -n "__omf.opt_is c cd" -a (printf "%s " (omf.list_db_packages))
complete -c omf -n "__omf.opt_is i install" -a (printf "%s " (omf.list_db_packages))
complete -c omf -n "__omf.opt_is t theme" -a (printf "%s " (omf.list_themes))
complete -c omf -a list -n "__omf.is_single_opt" -d "List local packages"
complete -c omf -a list -n "__omf.is_single_opt" -d "List local packages"
complete -c omf -a install -n "__omf.is_single_opt" -d "Install one or more packages"
complete -c omf -a describe -n "__omf.is_single_opt" -d "Get information about what packages do"
complete -c omf -a theme -n "__omf.is_single_opt" -d "List / Use themes"
complete -c omf -a install -n "__omf.is_single_opt" -d "Install one or more packages"
complete -c omf -a remove -n "__omf.is_single_opt" -d "Remove a theme or package"
complete -c omf -a theme -n "__omf.is_single_opt" -d "List / Use themes"
complete -c omf -a update -n "__omf.is_single_opt" -d "Update Oh My Fish"
complete -c omf -a remove -n "__omf.is_single_opt" -d "Remove a theme or package"
complete -c omf -a new -n "__omf.is_single_opt" -d "Create a new package from a template"
complete -c omf -a update -n "__omf.is_single_opt" -d "Update Oh My Fish"
complete -c omf -a submit -n "__omf.is_single_opt" -d "Submit a package to the registry"
complete -c omf -a cd -n "__omf.is_single_opt" -d "Change directory to plugin/theme directory"
complete -c omf -a query -n "__omf.is_single_opt" -d "Query environment variables"
complete -c omf -a new -n "__omf.is_single_opt" -d "Create a new package from a template"
complete -c omf -a help -n "__omf.is_single_opt" -d "Display this help"
complete -c omf -a submit -n "__omf.is_single_opt" -d "Submit a package to the registry"
complete -c omf -a version -n "__omf.is_single_opt" -d "Display version"
complete -c omf -a query -n "__omf.is_single_opt" -d "Query environment variables"
complete -c omf -a destroy -n "__omf.is_single_opt" -d "Remove Oh My Fish"
complete -c omf -a help -n "__omf.is_single_opt" -d "Display this help"
complete -c omf -a version -n "__omf.is_single_opt" -d "Display version"
complete -c omf -a destroy -n "__omf.is_single_opt" -d "Remove Oh My Fish"
pkg/omf/omf.fish
View file @
00701642
...
@@ -72,6 +72,13 @@ function omf -d "Oh My Fish"
...
@@ -72,6 +72,13 @@ function omf -d "Oh My Fish"
case "l" "li" "lis" "lst" "list"
case "l" "li" "lis" "lst" "list"
omf.list_local_packages | column
omf.list_local_packages | column
case "d" "desc" "describe"
if test (count $argv) -eq 1
omf.describe
else
omf.describe $argv[2..-1]
end
case "i" "install" "get"
case "i" "install" "get"
if test (count $argv) -eq 1
if test (count $argv) -eq 1
omf.list_db_packages | column
omf.list_db_packages | column
...
...
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