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
e11eb0bd
Commit
e11eb0bd
authored
Mar 06, 2014
by
Greg Knaddison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #125: add a drupal-focused theme
parent
8fa61126
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
themes/fishy-drupal/README.md
themes/fishy-drupal/README.md
+12
-0
themes/fishy-drupal/drups-fish-theme.png
themes/fishy-drupal/drups-fish-theme.png
+0
-0
themes/fishy-drupal/fish_prompt.fish
themes/fishy-drupal/fish_prompt.fish
+43
-0
No files found.
themes/fishy-drupal/README.md
0 → 100644
View file @
e11eb0bd
## fishy-drupal

#### Features
*
Shows the present working directory, abbreviated (default fish style)
*
Shows the active git branch, if any
*
Shows the active drush site alias, if any
*
Shows yello ✗ if the current git directory is "dirty"
themes/fishy-drupal/drups-fish-theme.png
0 → 100644
View file @
e11eb0bd
46.6 KB
themes/fishy-drupal/fish_prompt.fish
0 → 100644
View file @
e11eb0bd
# name: fishy-drupal
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function _drush_alias_name
set -l pid %self
if test -f "$TMPDIR/drush-env/drush-drupal-site-$pid"
echo (command cat $TMPDIR/drush-env/drush-drupal-site-$pid)
end
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set -l blue (set_color -o blue)
set -l normal (set_color normal)
set -l arrow "$blue➜ "
set -l cwd (set_color $fish_color_cwd)(prompt_pwd)
if [ (_git_branch_name) ]
set -l git_branch $red(_git_branch_name)
set git_info "$blue git:($git_branch$blue)"
if [ (_is_git_dirty) ]
set -l dirty "$yellow ✗"
set git_dirty "$dirty"
end
end
if [ (_drush_alias_name) ]
set -l drush_alias $blue(_drush_alias_name)
set drush_info "$green drush:($drush_alias$green)"
end
echo -n -s $arrow $cwd $git_info $drush_info $git_dirty $normal ' '
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