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
0b66c436
Commit
0b66c436
authored
Dec 21, 2015
by
Derek Willian Stavis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #190 from oranja/omf-theme-colorful
Better organized 'omf theme' output
parents
4e279f93
c5670bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
pkg/omf/omf.fish
pkg/omf/omf.fish
+10
-5
No files found.
pkg/omf/omf.fish
100644 → 100755
View file @
0b66c436
...
...
@@ -21,6 +21,10 @@ function omf::dim
set_color $fish_color_autosuggestion ^/dev/null; or set_color 555
end
function omf::under
set_color --underline
end
function omf::err
set_color $fish_color_error ^/dev/null; or set_color red --bold
end
...
...
@@ -119,13 +123,14 @@ function omf -d "Oh My Fish"
case "t" "theme"
if test (count $argv) -eq 1
set -l ostype (uname)
set -l theme (cat $OMF_CONFIG/theme)
set -l regex "[[:<:]]($theme)[[:>:]]"
test "$ostype" != "Darwin"; and set regex "\b($theme)\b"
set -l highlight_current "(^|[[:space:]])($theme)([[:space:]]|\$)"
omf.packages.list --database --theme | column | sed -E "s/$regex/"(omf::em)"\1"(omf::off)"/"
omf::off
echo (omf::under)"Installed:"(omf::off)
omf.packages.list --installed --theme | column | sed -E s/"$highlight_current"/"\1"(omf::em)"\2"(omf::off)"\3"/g
echo
echo (omf::under)"Available:"(omf::off)
omf.packages.list --available --theme | column
else if test (count $argv) -eq 2
omf.theme $argv[2]
else
...
...
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