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
2e5761ab
Commit
2e5761ab
authored
Oct 03, 2015
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from oh-my-fish/commands-organization
Organize commands and remove undocumented aliases
parents
4446cbc7
46e4d036
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
89 deletions
+89
-89
pkg/omf/cli/omf.help.fish
pkg/omf/cli/omf.help.fish
+55
-55
pkg/omf/omf.fish
pkg/omf/omf.fish
+34
-34
No files found.
pkg/omf/cli/omf.help.fish
View file @
2e5761ab
function omf.help -a
type_flag
switch $
type_flag
case "
i" "install" "get
"
function omf.help -a
command
switch $
command
case "
c" "cd
"
echo \n"\
Install packages
.
Change directory to root or plugin/theme directory
.
"(omf::dim)"Usage:"(omf::off)"
omf
install Install missing packages from bundle
omf
install "(omf::em)"<name>"(omf::off)" | "(omf::em)"<url>"(omf::off)" Install package by name or URL
omf
cd Change to Oh My Fish root folder
omf
cd "(omf::em)"<package name>"(omf::off)" | "(omf::em)"<theme name>"(omf::off)" Change to plugin or theme directory by name
"(omf::dim)"Examples:"(omf::off)"
omf
install
omf
install
brew
omf
install https://github.com/oh-my-fish/plugin-brew
omf
cd
omf
cd
brew
omf
cd l
"
case "
u" "up" "upd" "updat
e"
case "
d" "describ
e"
echo \n"\
Update Oh My Fish
.
Get information about what packages do
.
"(omf::dim)"Usage:"(omf::off)"
omf update
omf describe Get information from all available packages
omf describe "(omf::em)"<name>"(omf::off)" Get information from package by name
"(omf::dim)"Examples:"(omf::off)"
omf describe
omf describe brew
"
case "destroy"
...
...
@@ -30,66 +35,66 @@ function omf.help -a type_flag
omf destroy
"
case "
l" "li" "lis" "lst" "lis
t"
case "
i" "install" "ge
t"
echo \n"\
List loca
l packages.
Instal
l packages.
"(omf::dim)"Usage:"(omf::off)"
omf list
omf install Install missing packages from bundle
omf install "(omf::em)"<name>"(omf::off)" | "(omf::em)"<url>"(omf::off)" Install package by name or URL
"(omf::dim)"Examples:"(omf::off)"
omf install
omf install brew
omf install https://github.com/oh-my-fish/plugin-brew
"
case "
t" "theme
"
case "
l" "ls" "list
"
echo \n"\
Install and list them
es.
List local packag
es.
"(omf::dim)"Usage:"(omf::off)"
omf theme List available themes to install
omf theme "(omf::em)"<name>"(omf::off)" Install theme by name
"(omf::dim)"Examples:"(omf::off)"
omf theme
omf theme l
omf list
"
case "
r" "rem" "rm" "remove" "uninstall
"
case "
n" "new
"
echo \n"\
Remove a theme or packag
e.
Create a new package from a templat
e.
"(omf::dim)"Usage:"(omf::off)"
omf
remove "(omf::em)"<package name>"(omf::off)" | "(omf::em)"<theme name>"(omf::off)" Removes a theme or package by nam
e
omf
new ("(omf::dim)"pkg"(omf::off)" | "(omf::dim)"theme"(omf::off)") "(omf::em)"<name>"(omf::off)" Create a new package from a templat
e
"(omf::dim)"Examples:"(omf::off)"
omf
remove brew
omf
remove l
omf
new pkg mypkg
omf
new theme mytheme
"
case "
c" "cd
"
case "
q" "query
"
echo \n"\
Change directory to root or plugin/theme directory
.
Query environment variables
.
"(omf::dim)"Usage:"(omf::off)"
omf cd Change to Oh My Fish root folder
omf cd "(omf::em)"<package name>"(omf::off)" | "(omf::em)"<theme name>"(omf::off)" Change to plugin or theme directory by name
omf query ["(omf::em)"<name>"(omf::off)"] Query environment variables
"(omf::dim)"Examples:"(omf::off)"
omf
cd
omf
cd brew
omf
cd l
omf
query
omf
query path
omf
query version
"
case "
n" "nw" "new
"
case "
r" "rm" "remove" "uninstall
"
echo \n"\
Create a new package from a templat
e.
Remove a theme or packag
e.
"(omf::dim)"Usage:"(omf::off)"
omf
new ("(omf::dim)"pkg"(omf::off)" | "(omf::dim)"theme"(omf::off)") "(omf::em)"<name>"(omf::off)" Create a new package from a templat
e
omf
remove "(omf::em)"<package name>"(omf::off)" | "(omf::em)"<theme name>"(omf::off)" Removes a theme or package by nam
e
"(omf::dim)"Examples:"(omf::off)"
omf
new pkg mypkg
omf
new theme mytheme
omf
remove brew
omf
remove l
"
case "s" "su
" "sub" "su
bmit"
case "s" "submit"
echo \n"\
Submit a package to the registry.
...
...
@@ -101,30 +106,25 @@ function omf.help -a type_flag
omf submit theme https://github.com/oh-my-fish/plugin-mythemes
"
case "
q" "query
"
case "
t" "theme
"
echo \n"\
Query environment variabl
es.
Install and list them
es.
"(omf::dim)"Usage:"(omf::off)"
omf query ["(omf::em)"<name>"(omf::off)"] Query environment variables
omf theme List available themes to install
omf theme "(omf::em)"<name>"(omf::off)" Install theme by name
"(omf::dim)"Examples:"(omf::off)"
omf query
omf query path
omf query version
omf theme
omf theme l
"
case "
d" "desc" "describ
e"
case "
u" "updat
e"
echo \n"\
Get information about what packages do
.
Update Oh My Fish
.
"(omf::dim)"Usage:"(omf::off)"
omf describe Get information from all available packages
omf describe "(omf::em)"<name>"(omf::off)" Get information from package by name
"(omf::dim)"Examples:"(omf::off)"
omf describe
omf describe brew
omf update
"
case "*"
...
...
pkg/omf/omf.fish
View file @
2e5761ab
...
...
@@ -73,16 +73,16 @@ function omf -d "Oh My Fish"
return $OMF_INVALID_ARG
end
case "l" "li" "lis" "lst" "list"
omf.list_local_packages | column
case "d" "desc" "describe"
case "d" "describe"
if test (count $argv) -eq 1
omf.describe
else
omf.describe $argv[2..-1]
end
case "destroy"
omf.destroy
case "i" "install" "get"
if test (count $argv) -eq 1
omf.bundle.install
...
...
@@ -91,6 +91,35 @@ function omf -d "Oh My Fish"
refresh
end
case "l" "ls" "list"
omf.list_local_packages | column
case "n" "new"
if test (count $argv) -ne 3
echo (omf::err)"Package type or name missing"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" "(omf::em)"pkg|theme"(omf::off)" <name>" 1^&2
return $OMF_MISSING_ARG
end
omf.new $argv[2..-1]
case "r" "rm" "remove" "uninstall"
if test (count $argv) -ne 2
echo (omf::err)"Invalid number of arguments"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" <[package|theme] name>" 1^&2
return $OMF_INVALID_ARG
end
omf.remove_package $argv[2] ; and refresh
case "s" "submit"
switch (count $argv)
case 3
omf.submit $argv[2] $argv[3]
case "*"
echo (omf::err)"Argument missing"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" "(omf::em)"pkg|themes"(omf::off)"/<name> <url>" 1^&2
return $OMF_MISSING_ARG
end
case "t" "theme"
if test (count $argv) -eq 1
set -l ostype (uname)
...
...
@@ -110,15 +139,7 @@ function omf -d "Oh My Fish"
return $OMF_INVALID_ARG
end
case "r" "rem" "rm" "remove" "uninstall"
if test (count $argv) -ne 2
echo (omf::err)"Invalid number of arguments"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" <[package|theme] name>" 1^&2
return $OMF_INVALID_ARG
end
omf.remove_package $argv[2] ; and refresh
case "u" "up" "upd" "update"
case "u" "update"
echo (omf::em)"Updating Oh My Fish..."(omf::off)
if omf.repo.pull $OMF_PATH
echo (omf::em)"Oh My Fish is up to date."(omf::off)
...
...
@@ -130,27 +151,6 @@ function omf -d "Oh My Fish"
omf.install_package (omf.list_installed_packages)
refresh
case "s" "su" "sub" "submit"
switch (count $argv)
case 3
omf.submit $argv[2] $argv[3]
case "*"
echo (omf::err)"Argument missing"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" "(omf::em)"pkg|themes"(omf::off)"/<name> <url>" 1^&2
return $OMF_MISSING_ARG
end
case "n" "nw" "new"
if test (count $argv) -ne 3
echo (omf::err)"Package type or name missing"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" "(omf::em)"pkg|theme"(omf::off)" <name>" 1^&2
return $OMF_MISSING_ARG
end
omf.new $argv[2..-1]
case "destroy"
omf.destroy
case "*"
echo (omf::err)"$argv[1] option not recognized"(omf::off) 1^&2
return $OMF_UNKNOWN_OPT
...
...
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