Skip to content
Snippets Groups Projects
Commit 82156c64 authored by jurgenhaas's avatar jurgenhaas
Browse files

#7 Add fish config for git status in prompt

parent 0136691a
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ LABEL com.example.vendor="LakeDrops" \
ENV LAKEDROPS_DEV_ENV 1
ENV LAKEDROPS_DEV_DC_OPTIONS " "
ADD config.fish /etc/fish/
RUN echo "Install dorgflow" && \
cd /var/opt && \
git clone https://github.com/joachim-n/dorgflow.git && \
......
#
# Settings for the git prompt
#
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_color_branch magenta --bold
set -g __fish_git_prompt_showupstream "informative"
set -g __fish_git_prompt_char_upstream_ahead "↑"
set -g __fish_git_prompt_char_upstream_behind "↓"
set -g __fish_git_prompt_char_upstream_prefix ""
set -g __fish_git_prompt_char_stagedstate "●"
set -g __fish_git_prompt_char_dirtystate "✚"
set -g __fish_git_prompt_char_untrackedfiles "…"
set -g __fish_git_prompt_char_conflictedstate "✖"
set -g __fish_git_prompt_char_cleanstate "✔"
set -g __fish_git_prompt_color_dirtystate blue
set -g __fish_git_prompt_color_stagedstate yellow
set -g __fish_git_prompt_color_invalidstate red
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
set -g __fish_git_prompt_color_cleanstate green --bold
#
# Set some value for LANG if nothing was set before, and this is a
# login shell.
#
if not set -q LANG >/dev/null
set -gx LANG en_US.UTF-8
end
# Check for i18n information in
# /etc/sysconfig/i18n
if test -f /etc/sysconfig/i18n
eval (cat /etc/sysconfig/i18n |sed -ne 's/^\([a-zA-Z]*\)=\(.*\)$/set -gx \1 \2;/p')
end
#
# Put linux consoles in unicode mode.
#
if test "$TERM" = linux
if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
if which unicode_start >/dev/null
unicode_start
end
end
end
function _drush_alias_name
set -l pid %self
set -l TMPDIR /tmp
if test -f "$TMPDIR/drush-env/drush-drupal-site-$pid"
set -l alias (set_color red)(command cat $TMPDIR/drush-env/drush-drupal-site-$pid)
echo (set_color blue)" drush:($alias"(set_color blue)")"
end
end
#
# Define the colored prompt
#
function fish_prompt --description 'Prompt anzeigen'
if test -z $WINDOW
printf '%s%s@%s%s%s%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color red) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (_drush_alias_name) (set_color normal) (__fish_vcs_prompt) (set_color normal)
else
printf '%s%s@%s%s%s(%s)%s%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color red) (hostname|cut -d . -f 1) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (_drush_alias_name) (set_color normal) (__fish_vcs_prompt) (set_color normal)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment