Skip to content

Instantly share code, notes, and snippets.

@ronaldsuwandi
Last active November 12, 2018 07:44
Show Gist options
  • Select an option

  • Save ronaldsuwandi/1442f5e926a070a3739117516fb1b379 to your computer and use it in GitHub Desktop.

Select an option

Save ronaldsuwandi/1442f5e926a070a3739117516fb1b379 to your computer and use it in GitHub Desktop.

Revisions

  1. ronaldsuwandi revised this gist Nov 12, 2018. 1 changed file with 9 additions and 6 deletions.
    15 changes: 9 additions & 6 deletions .bash_prompt
    Original file line number Diff line number Diff line change
    @@ -3,10 +3,13 @@ alias ll='ls -l'

    export JAVA_HOME=/Libary/Java/Home

    if [[ -e ~/.kube/config && $(type -P kubectl 2>/dev/null) ]]; then
    CURRENT_CONTEXT=" [$(kubectl config current-context)]"
    else
    CURRENT_CONTEXT=""
    fi
    kubecontext()
    {
    if [[ -e ~/.kube/config && $(type -P kubectl 2>/dev/null) ]]; then
    echo -n " [$(kubectl config current-context)]"
    else
    echo -n ""
    fi
    }

    export PS1="\w${CURRENT_CONTEXT} ☕️ "
    export PS1="\w\$(kubecontext) ☕️ "
  2. ronaldsuwandi created this gist Sep 21, 2018.
    12 changes: 12 additions & 0 deletions .bash_prompt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    alias ls='ls -FGH'
    alias ll='ls -l'

    export JAVA_HOME=/Libary/Java/Home

    if [[ -e ~/.kube/config && $(type -P kubectl 2>/dev/null) ]]; then
    CURRENT_CONTEXT=" [$(kubectl config current-context)]"
    else
    CURRENT_CONTEXT=""
    fi

    export PS1="\w${CURRENT_CONTEXT} ☕️ "