title: Can I shorten branch names in my terminal in fish
body: <p>My question is basically <a href="https://stackoverflow.com/questions/50779468/shorten-branch-names-in-terminal-with-powerlevel9k-and-zsh">this</a>, but for fish, as the solution given there does not apply for this</p>
  <p>Currently my fish terminal often looks like</p>
  <pre><code>&gt;&lt;&gt; ~r/f/d/config on LONG_APP_NAME_RELEASE_CANDIDATE_1_4 x           16:55:12
  </code></pre>
  <p>So it leaves little space for me to actually type in. anyone have any ideas on how to fix this, to maybe look like this:</p>
  <pre><code>&gt;&lt;&gt; ~r/f/d/config on LONG_A...1_4 x                                   16:55:12
  </code></pre>
  <p>As @glenn proposed in the comments, i typed out <code>type fish_prompt</code></p>
  <p>and got a function</p>
  <pre><code>  1 fish_prompt is a function with definition
    2 # Defined in /Users/mge/.config/fish/functions/fish_prompt.fish @ line 5
    3 function fish_prompt
    4   set -l last_command_status $status
    5   set -l cwd
    6 
    7   if test &quot;$theme_short_path&quot; = 'yes'
    8     set cwd (basename (prompt_pwd))
    9   else
   10     set cwd (prompt_pwd)
   11   end
   12 
   13   set -l fish     &quot;⋊&gt;&quot;
   14   set -l ahead    &quot;↑&quot;
   15   set -l behind   &quot;↓&quot;
   16   set -l diverged &quot;⥄ &quot;
   17   set -l dirty    &quot;⨯&quot;
   18   set -l none     &quot;◦&quot;
   19 
   20   set -l normal_color     (set_color normal)
   21   set -l success_color    (set_color $fish_pager_color_progress 2&gt; /dev/null    ; or set_color cyan)
   22   set -l error_color      (set_color $fish_color_error 2&gt; /dev/null; or set_    color red --bold)
   23   set -l directory_color  (set_color $fish_color_quote 2&gt; /dev/null; or set_    color brown)
   24   set -l repository_color (set_color $fish_color_cwd 2&gt; /dev/null; or set_co    lor green)
   25 
   26   if test $last_command_status -eq 0
   27     echo -n -s $success_color $fish $normal_color
   28   else
   29     echo -n -s $error_color $fish $normal_color
   30   end
   31 
   32   if git_is_repo
   33     if test &quot;$theme_short_path&quot; = 'yes'
   34       set root_folder (command git rev-parse --show-toplevel 2&gt; /dev/null)
   35       set parent_root_folder (dirname $root_folder)
   36       set cwd (echo $PWD | sed -e &quot;s|$parent_root_folder/||&quot;)
   37     end
   38 
   39     echo -n -s &quot; &quot; $directory_color $cwd $normal_color
   40     echo -n -s &quot; on &quot; $repository_color (git_branch_name) $normal_color &quot; &quot;
   41 
   42     if git_is_touched
   43       echo -n -s $dirty
   44     else
   45       echo -n -s (git_ahead $ahead $behind $diverged $none)
   46     end
   47   else
   48     echo -n -s &quot; &quot; $directory_color $cwd $normal_color
   49   end
   50 
   51   echo -n -s &quot; &quot;
   52 end
  </code></pre>
  <p>This is almost giving me the right idea to solve this, however i don't speak fish so i am not sure how i would edit this</p>