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
a1856c71
Commit
a1856c71
authored
Jan 02, 2016
by
Derek Willian Stavis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #210 from oranja/omf-package-prefix
Support omf- prefix for packages
parents
5e7abd6a
4dbb1ca5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
pkg/omf/cli/omf.bundle.install.fish
pkg/omf/cli/omf.bundle.install.fish
+1
-1
pkg/omf/cli/omf.bundle.remove.fish
pkg/omf/cli/omf.bundle.remove.fish
+4
-5
pkg/omf/cli/omf.install.fish
pkg/omf/cli/omf.install.fish
+2
-2
pkg/omf/util/omf.package_name.fish
pkg/omf/util/omf.package_name.fish
+3
-0
No files found.
pkg/omf/cli/omf.bundle.install.fish
View file @
a1856c71
...
...
@@ -16,7 +16,7 @@ function omf.bundle.install
set name_or_url (echo $record | cut -s -d' ' -f2- | sed 's/ //g')
test -n "$name_or_url"; or continue
set name (
basename $name_or_url | sed 's/\.git//;s/^pkg-//;s/^plugin-//;s/^theme-//'
)
set name (
omf.package_name $name_or_url
)
if not contains $name $packages
omf.install $name_or_url;
...
...
pkg/omf/cli/omf.bundle.remove.fish
View file @
a1856c71
...
...
@@ -10,12 +10,11 @@ function omf.bundle.remove
for record in $bundle_contents
set record_type (echo $record | cut -d' ' -f1)
set record_name (echo $record | cut -d' ' -f2-)
set record_basename (basename (echo $record_name | \
sed -e 's/\.git$//') | sed 's/^pkg-//;s/^plugin-//;s/^theme-//')
set record_name_or_url (echo $record | cut -d' ' -f2-)
set record_name (omf.package_name $record_name_or_url)
if not test "$type" = "$record_type" -a "$name" = "$record_
base
name"
echo "$record_type $record_name" >> $bundle
if not test "$type" = "$record_type" -a "$name" = "$record_name"
echo "$record_type $record_name
_or_url
" >> $bundle
end
end
end
...
...
pkg/omf/cli/omf.install.fish
View file @
a1856c71
...
...
@@ -17,9 +17,9 @@ function omf.install -a name_or_url
if test -e $OMF_PATH/db/$parent_path/$name_or_url
set name $name_or_url
set url (cat $OMF_PATH/db/$parent_path/$name
_or_url
)
set url (cat $OMF_PATH/db/$parent_path/$name)
else
set name (
basename $name_or_url | sed 's/^pkg-//;s/^plugin-//;s/^theme-//;s/\.git$//'
)
set name (
omf.package_name $name_or_url
)
set url $name_or_url
end
...
...
pkg/omf/util/omf.package_name.fish
0 → 100644
View file @
a1856c71
function omf.package_name -a name_or_url
basename $name_or_url | sed -E 's/^(omf-)?((plugin|pkg|theme)-)?//;s/.git$//'
end
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