Skip to content
forked from mdan16/cf-ps1

Cloud Foundry prompt for bash and zsh

License

Notifications You must be signed in to change notification settings

gidoichi/cf-ps1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cf-ps1

The cf-ps1 set the current foundation and organization and space of Cloud Foundry to your Bash/Zsh prompt.

prompt.png

The cf-ps1 inspired by kube-ps1.

Requirements

Supported Shell

  • Bash
  • Zsh

Installing

Bash

Source the cf-ps1.sh in your ~/.bashrc

CF_PS1_API_ENDPOINT_FOUNDATION_POSITION=2 # when your cf api endtpoint is https://api.foundation.example.com 
source /path/to/cf-ps1.sh
PS1="[\u@\h \W $(cf_ps1)]\$ "

Zsh

Source the cf-ps1.sh in your ~/.zshrc

CF_PS1_API_ENDPOINT_FOUNDATION_POSITION=2 # when your cf api endtpoint is https://api.foundation.example.com 
source /path/to/cf-ps1.sh
PROMPT='$(cf_ps1)'$PROMPT

Environment

Variable Format Default Description
CF_PS1_API_ENDPOINT_FOUNDATION_POSITION integer false When a api endpoint is https://api.foundation.example.com, api will be displayed if set to 1, foundation will be displayed if set to 2. If not set, the entire api endpoint will be displayed as foundation.

About

Cloud Foundry prompt for bash and zsh

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%