mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-29 12:12:54 +00:00
allow disabling interactive mode with fzf (#82)
Introduce KUBECTX_IGNORE_FZF for both kubectx/kubens to force-disable attempt to enable interactive mode and lookup for fzf(1).
This commit is contained in:
parent
d931779c0c
commit
ccc077b6c5
@ -135,6 +135,9 @@ with fuzzy searching, you just need to [install
|
||||
|
||||

|
||||
|
||||
If you have `fzf` installed, but want to opt out of using this feature, set the environment variable `KUBECTX_IGNORE_FZF=1`.
|
||||
|
||||
|
||||
-----
|
||||
|
||||
### Customizing colors
|
||||
|
2
kubectx
2
kubectx
@ -160,7 +160,7 @@ delete_context() {
|
||||
|
||||
main() {
|
||||
if [[ "$#" -eq 0 ]]; then
|
||||
if [[ -t 1 && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then
|
||||
if [[ -t 1 && -z "${KUBECTX_IGNORE_FZF:-}" && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then
|
||||
choose_context_interactive
|
||||
else
|
||||
list_contexts
|
||||
|
Loading…
Reference in New Issue
Block a user