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
3d924b79
Commit
3d924b79
authored
Aug 28, 2015
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #541 from fish-shell/cd-cli
cd command
parents
0fc2249b
ecb9dfa0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
14 deletions
+53
-14
pkg/omf/cli/omf.cd.fish
pkg/omf/cli/omf.cd.fish
+25
-0
pkg/omf/cli/omf.help.fish
pkg/omf/cli/omf.help.fish
+13
-11
pkg/omf/cli/omf.install.fish
pkg/omf/cli/omf.install.fish
+1
-1
pkg/omf/omf.fish
pkg/omf/omf.fish
+14
-2
No files found.
pkg/omf/cli/omf.cd.fish
0 → 100644
View file @
3d924b79
# SYNOPSIS
# Change the current working directory to plugin / theme home directory.
#
# OPTIONS
# <name> Name of the package or theme.
function omf.cd -a name -d "Change the current working directory to plugin / theme home directory."
if test -z $name
pushd $OMF_PATH
return 0
end
if test -e $OMF_CONFIG/pkg/$name
pushd $OMF_CONFIG/pkg/$name
else if test -e $OMF_CONFIG/themes/$name
pushd $OMF_CONFIG/themes/$name
else if test -e $OMF_PATH/pkg/$name
pushd $OMF_PATH/pkg/$name
else if test -e $OMF_PATH/themes/$name
pushd $OMF_PATH/themes/$name
else
echo (omf::err)"$name is not a valid package/theme name"(omf::off) 1^&2
return $OMF_INVALID_ARG
end
end
pkg/omf/cli/omf.help.fish
View file @
3d924b79
...
@@ -4,17 +4,19 @@ function omf.help
...
@@ -4,17 +4,19 @@ function omf.help
omf "(omf::em)"action"(omf::off)" [options]
omf "(omf::em)"action"(omf::off)" [options]
"(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)"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.
"(omf::em)"u"(omf::off)"pdate Update Oh My Fish.
"(omf::em)"u"(omf::off)"pdate Update Oh My Fish.
"(omf::em)"n"(omf::off)"ew Create a new package from a template.
"(omf::em)"n"(omf::off)"ew Create a new package from a template.
"(omf::em)"s"(omf::off)"ubmit Submit a package to the registry.
"(omf::em)"s"(omf::off)"ubmit Submit a package to the registry.
"(omf::em)"q"(omf::off)"uery Query environment variables.
"(omf::em)"q"(omf::off)"uery Query environment variables.
"(omf::em)"h"(omf::off)"elp Display this help.
"(omf::em)"destroy"(omf::off)" Uninstall Oh My Fish.
"(omf::em)"v"(omf::off)"ersion Display version.
"(omf::em)"destroy"(omf::off)" Uninstall Oh My Fish.
"(omf::dim)"Options"(omf::off)"
"(omf::em)"--h"(omf::off)"elp Display this help.
"(omf::em)"--v"(omf::off)"ersion Display version.
For more information visit → "(omf::em)"git.io/oh-my-fish"(omf::off)\n
For more information visit → "(omf::em)"git.io/oh-my-fish"(omf::off)\n
end
end
pkg/omf/cli/omf.install.fish
View file @
3d924b79
...
@@ -10,7 +10,7 @@ function omf.install -a type_flag name_or_url
...
@@ -10,7 +10,7 @@ function omf.install -a type_flag name_or_url
echo (omf::err)"Argument to omf.install must be --theme [name|URL] or --pkg [name|URL]"(omf::off)
echo (omf::err)"Argument to omf.install must be --theme [name|URL] or --pkg [name|URL]"(omf::off)
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
if test -e $OMF_PATH/db/$parent_path/$name_or_url
if test -e $OMF_PATH/db/$parent_path/$name_or_url
set target $parent_path/$name_or_url
set target $parent_path/$name_or_url
else
else
...
...
pkg/omf/omf.fish
View file @
3d924b79
...
@@ -39,7 +39,7 @@ function omf -d "Oh My Fish"
...
@@ -39,7 +39,7 @@ function omf -d "Oh My Fish"
end
end
switch $argv[1]
switch $argv[1]
case "
v" "ver" "version
"
case "
-v*" "--v*
"
omf.version
omf.version
case "q" "query"
case "q" "query"
...
@@ -54,9 +54,21 @@ function omf -d "Oh My Fish"
...
@@ -54,9 +54,21 @@ function omf -d "Oh My Fish"
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
case "
h
" "help"
case "
-h*" "--h*
" "help"
omf.help
omf.help
case "c" "cd"
switch (count $argv)
case 1
omf.cd
case 2
omf.cd $argv[2]
case "*"
echo (omf::err)"Invalid number of arguments"(omf::off) 1^&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" <name>" 1^&2
return $OMF_INVALID_ARG
end
case "l" "li" "lis" "lst" "list"
case "l" "li" "lis" "lst" "list"
omf.list_local_packages | column
omf.list_local_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