Skip to content

Instantly share code, notes, and snippets.

@trautonen
Created April 26, 2018 15:00
Show Gist options
  • Select an option

  • Save trautonen/bd26dc33c857d2bb810b910c51de34ea to your computer and use it in GitHub Desktop.

Select an option

Save trautonen/bd26dc33c857d2bb810b910c51de34ea to your computer and use it in GitHub Desktop.

Revisions

  1. trautonen created this gist Apr 26, 2018.
    13 changes: 13 additions & 0 deletions fish_prompt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # Edit your fish prompt with `funced fish_prompt` and
    # add the following to a desired place in the function.
    # Save the prompt after editing with `funcsave fish_prompt`.

    # Set a variable for workspace color.
    set -l tfworkspace_color (set_color green)

    # Append the workspace name at the current prompt position if
    # the directory contains a .terraform subdirectory
    if test -d .terraform
    set workspace (terraform workspace show ^/dev/null)
    echo -n -s " " $tfworkspace_color "[" $workspace "]" $normal_color
    end