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
5662032b
Commit
5662032b
authored
Nov 17, 2014
by
Justin Hileman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bobthefish] More consistent project dir func names
parent
c84ae81a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
themes/bobthefish/fish_prompt.fish
themes/bobthefish/fish_prompt.fish
+7
-7
No files found.
themes/bobthefish/fish_prompt.fish
View file @
5662032b
...
@@ -95,11 +95,11 @@ function __bobthefish_pretty_parent -d 'Print a parent directory, shortened to f
...
@@ -95,11 +95,11 @@ function __bobthefish_pretty_parent -d 'Print a parent directory, shortened to f
echo -n (dirname $argv[1]) | sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\(\.\{0,1\}[^/]\)\([^/]*\)-/\1-g' -e 's|/$||'
echo -n (dirname $argv[1]) | sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\(\.\{0,1\}[^/]\)\([^/]*\)-/\1-g' -e 's|/$||'
end
end
function __bobthefish_project_dir -d 'Print the current git project base directory'
function __bobthefish_
git_
project_dir -d 'Print the current git project base directory'
command git rev-parse --show-toplevel 2>/dev/null
command git rev-parse --show-toplevel 2>/dev/null
end
end
function __bobthefish_
project_dir_hg -d 'Print the current git
project base directory'
function __bobthefish_
hg_project_dir -d 'Print the current hg
project base directory'
command hg root 2>/dev/null
command hg root 2>/dev/null
end
end
...
@@ -241,7 +241,7 @@ function __bobthefish_prompt_hg -d 'Display the actual hg state'
...
@@ -241,7 +241,7 @@ function __bobthefish_prompt_hg -d 'Display the actual hg state'
set flag_fg fff
set flag_fg fff
end
end
__bobthefish_path_segment (__bobthefish_
project_dir_hg
)
__bobthefish_path_segment (__bobthefish_
hg_project_dir
)
__bobthefish_start_segment $flag_bg $flag_fg
__bobthefish_start_segment $flag_bg $flag_fg
echo -n -s $__bobthefish_hg_glyph ' '
echo -n -s $__bobthefish_hg_glyph ' '
...
@@ -251,7 +251,7 @@ function __bobthefish_prompt_hg -d 'Display the actual hg state'
...
@@ -251,7 +251,7 @@ function __bobthefish_prompt_hg -d 'Display the actual hg state'
echo -n -s (__bobthefish_hg_branch) $flags ' '
echo -n -s (__bobthefish_hg_branch) $flags ' '
set_color normal
set_color normal
set -l project_pwd (__bobthefish_project_pwd (__bobthefish_
project_dir_hg
))
set -l project_pwd (__bobthefish_project_pwd (__bobthefish_
hg_project_dir
))
if test "$project_pwd"
if test "$project_pwd"
if test -w "$PWD"
if test -w "$PWD"
__bobthefish_start_segment 333 999
__bobthefish_start_segment 333 999
...
@@ -288,14 +288,14 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
...
@@ -288,14 +288,14 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
end
end
end
end
__bobthefish_path_segment (__bobthefish_project_dir)
__bobthefish_path_segment (__bobthefish_
git_
project_dir)
__bobthefish_start_segment $flag_bg $flag_fg
__bobthefish_start_segment $flag_bg $flag_fg
set_color $flag_fg --bold
set_color $flag_fg --bold
echo -n -s (__bobthefish_git_branch) $flags ' '
echo -n -s (__bobthefish_git_branch) $flags ' '
set_color normal
set_color normal
set -l project_pwd (__bobthefish_project_pwd (__bobthefish_project_dir))
set -l project_pwd (__bobthefish_project_pwd (__bobthefish_
git_
project_dir))
if test "$project_pwd"
if test "$project_pwd"
if test -w "$PWD"
if test -w "$PWD"
__bobthefish_start_segment 333 999
__bobthefish_start_segment 333 999
...
@@ -353,7 +353,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
...
@@ -353,7 +353,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
end
end
if __bobthefish_in_git # TODO: do this right.
if __bobthefish_in_git # TODO: do this right.
__bobthefish_prompt_git # if something is in both git and hg, check the length of
__bobthefish_prompt_git # if something is in both git and hg, check the length of
else if __bobthefish_in_hg # __bobthefish_
project_dir vs __bobthefish_project_dir_hg
else if __bobthefish_in_hg # __bobthefish_
git_project_dir vs __bobthefish_hg_project_dir
__bobthefish_prompt_hg # and pick the longer of the two.
__bobthefish_prompt_hg # and pick the longer of the two.
else
else
__bobthefish_prompt_dir
__bobthefish_prompt_dir
...
...
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