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
ba780ef9
Commit
ba780ef9
authored
Jul 15, 2014
by
syl20bnr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Mac OS X compatibility for ranger feature of syl20bnr theme
parent
59ada029
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
themes/syl20bnr/README.md
themes/syl20bnr/README.md
+8
-1
themes/syl20bnr/fish_prompt.fish
themes/syl20bnr/fish_prompt.fish
+13
-2
No files found.
themes/syl20bnr/README.md
View file @
ba780ef9
...
...
@@ -13,6 +13,7 @@ Sylvain Benner personal, compact (hmmm...) yet complete (almost :-)) oh-my-fish
-
[
end
](
#end
)
-
[
where
](
#where
)
-
[
Functions
](
#functions
)
-
[
Mac compatibility
](
#mac-compatibility
)
-
[
Cygwin compatibility
](
#cygwin-compatibility
)
## Segments
...
...
@@ -101,12 +102,18 @@ This segment is displayed in the right prompt.
Some functions come with the theme:
-
`toggle_right_prompt`
will... toggle the right prompt! (alias:
`trp`
)
## Mac compatibility
In order to make this theme work correctly with all the features make sure to
install the following packages via MacPorts or Homebrew:
-
`pstree`
(used in ranger detection)
## Cygwin compatibility
In order to make this theme work on
[
Cygwin
][
cygwin
]
, make sure to install the following
packages:
-
`bc`
for
`math`
fish function
-
`psmisc`
for
`pstree`
-
`psmisc`
for
`pstree`
(used in ranger detection)
-
`git`
if you want to use the
`git`
segment.
[
git
]:
http://git-scm.com/
...
...
themes/syl20bnr/fish_prompt.fish
View file @
ba780ef9
...
...
@@ -166,8 +166,19 @@ function fish_prompt -d "Write out the left prompt of the syl20bnr theme"
# the current shell process and get back to the ranger process.
set -l ps_end ">"
# indicator for ranger parent process
set ranger ""
if pstree -p -l | grep "fish("(echo %self)")" | grep 'ranger([0-9]*)' > /dev/null
set -l ranger ""
set -l os (uname)
if test "$os" = "Darwin"
if pstree -s ranger | grep (echo %self) | grep -v grep > /dev/null
set ranger 1
end
end
if test "$os" = "Linux"
if pstree -p -l | grep "fish("(echo %self)")" | grep 'ranger([0-9]*)' > /dev/null
set ranger 1
end
end
if test -n "$ranger"
set ps_end $ps_end$ps_end
end
# last status give the color of the right arrows at the end of the prompt
...
...
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