Comments (6)
How would you like this to be done? Do you want to be able to customize the prompt via kubie's config file or do you want kubie to allow you to overwrite the prompt via some sort of hook?
from kubie.
My initial attempt was to only enable some of my ps1 when one of the kubie env vars was set since it spawns a new shell. From what i can tell, your bashrc is loaded prior to kubie config therefore it doesnt do any good.
Low hanging fruit would be allowing a source to a file post init i think? Thoughts?
from kubie.
Are you using bash on a Mac machine? There's currently a bug in how the bash config files are loaded on Mac, see #13
from kubie.
I am on ubuntu 19.10 and do not have that issue :D
from kubie.
Can you give me more details about you want to achieve exactly? I'm not sure I understand fully what you want to do.
from kubie.
I actually got it working. Thanks for your patience. For those reading later that use kube-ps1 still with kubie, here is an example of using kubie's KUBIE_ACTIVE
var to trigger visibility only when in a kubie ctx:
if [ ! -z ${KUBIE_ACTIVE+x} ]
then
# PS1 Pre-bash-git
source ~/.kube-ps1/kube-ps1.sh
PS1_PREFIX='\u@\h $(kube_ps1)$(aws_prompt)'
else
PS1_PREFIX='\u@\h$(aws_prompt)'
fi
PS1_SUFFIX='\n\[\033[0;33m\]\w\[\033[0;0m\] \$ '
PS1="${PS1_PREFIX}${PS1_SUFFIX}"
from kubie.
Related Issues (20)
- "exit" context HOT 1
- Please support nushell HOT 3
- support kubectl plugin?
- Feature request: ctx should support an initial command HOT 1
- Feature request: config files with contexts only HOT 1
- kubie breaks "tab-completion" HOT 1
- Customizing embedded skim
- kubeconfig has error HOT 1
- Bug: Kubie doesn't refresh kubeconfig file when it's regenerated HOT 1
- kubie doesn't restore ZDOTDIR HOT 3
- v0.20.0 darwin binary does not released HOT 5
- Error: No such file or directory HOT 2
- support for username and password prompt
- Fish completions don't tab complete contexts
- Hooks are not executed in zsh HOT 6
- `invalid type` when loading null values from config when clusters is null
- How to get rid of Kubernetes information given by fish? HOT 1
- Question regarding kubie ns HOT 2
- hooks not working? HOT 1
- [feature request] add a way to lock a context like https://github.com/ChaosInTheCRD/kube-lock
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubie.