mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-29 12:12:54 +00:00
fix(tmux): match style #390
This commit is contained in:
parent
1c6f516142
commit
56d04ebdb0
6
kubectx
6
kubectx
@ -113,11 +113,11 @@ switch_context() {
|
|||||||
|
|
||||||
choose_context_interactive() {
|
choose_context_interactive() {
|
||||||
local choice
|
local choice
|
||||||
local FZF='fzf'
|
local fzf='fzf'
|
||||||
[[ -n "${TMUX-}" ]] && FZF="fzf-tmux"
|
[[ -n "${TMUX-}" ]] && fzf="fzf-tmux"
|
||||||
choice="$(_KUBECTX_FORCE_COLOR=1 \
|
choice="$(_KUBECTX_FORCE_COLOR=1 \
|
||||||
FZF_DEFAULT_COMMAND="${SELF_CMD}" \
|
FZF_DEFAULT_COMMAND="${SELF_CMD}" \
|
||||||
${FZF} --ansi --no-preview || true)"
|
${fzf} --ansi --no-preview || true)"
|
||||||
if [[ -z "${choice}" ]]; then
|
if [[ -z "${choice}" ]]; then
|
||||||
echo 2>&1 "error: you did not choose any of the options"
|
echo 2>&1 "error: you did not choose any of the options"
|
||||||
exit 1
|
exit 1
|
||||||
|
6
kubens
6
kubens
@ -114,11 +114,11 @@ choose_namespace_interactive() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local choice
|
local choice
|
||||||
local FZF='fzf'
|
local fzf='fzf'
|
||||||
[[ -n "${TMUX-}" ]] && FZF="fzf-tmux"
|
[[ -n "${TMUX-}" ]] && fzf="fzf-tmux"
|
||||||
choice="$(_KUBECTX_FORCE_COLOR=1 \
|
choice="$(_KUBECTX_FORCE_COLOR=1 \
|
||||||
FZF_DEFAULT_COMMAND="${SELF_CMD}" \
|
FZF_DEFAULT_COMMAND="${SELF_CMD}" \
|
||||||
${FZF} --ansi --no-preview || true)"
|
${fzf} --ansi --no-preview || true)"
|
||||||
if [[ -z "${choice}" ]]; then
|
if [[ -z "${choice}" ]]; then
|
||||||
echo 2>&1 "error: you did not choose any of the options"
|
echo 2>&1 "error: you did not choose any of the options"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user