2 Commits

Author SHA1 Message Date
Ahmet Alp Balkan
d931779c0c Release v0.6.1
- FIX: fix crash when kubectx/kubens is installed --with-short-names and fzf(1)
  is in PATH, but calling the binaries with the wrong name. (#78)
2018-08-24 09:28:10 -07:00
Ahmet Alp Balkan
f01719a5a6 fix: --with-short-names not compatible with fzf (#79)
When kubectx is installed as kctx, FZF_DEFAULT_COMMAND=kubectx won't work.

Fixes #78.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-24 09:28:00 -07:00
2 changed files with 4 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
set -eou pipefail
IFS=$'\n\t'
SELF_CMD="$0"
KUBECTX="${HOME}/.kube/kubectx"
usage() {
@@ -91,7 +92,7 @@ switch_context() {
choose_context_interactive() {
local choice
choice="$(FZF_DEFAULT_COMMAND='kubectx' fzf --ansi || true)"
choice="$(FZF_DEFAULT_COMMAND="${SELF_CMD}" fzf --ansi || true)"
if [[ -z "${choice}" ]]; then
echo 2>&1 "error: you did not choose any of the options"
exit 1

3
kubens
View File

@@ -21,6 +21,7 @@
set -eou pipefail
IFS=$'\n\t'
SELF_CMD="$0"
KUBENS_DIR="${HOME}/.kube/kubens"
usage() {
@@ -95,7 +96,7 @@ choose_namespace_interactive() {
fi
local choice
choice="$(FZF_DEFAULT_COMMAND='kubens' fzf --ansi || true)"
choice="$(FZF_DEFAULT_COMMAND="${SELF_CMD}" fzf --ansi || true)"
if [[ -z "${choice}" ]]; then
echo 2>&1 "error: you did not choose any of the options"
exit 1