File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export EDITOR="nano"
6767export LANG=" en_US.UTF-8"
6868export TERM=" xterm-256color"
6969export COLORTERM=" truecolor"
70+ export FZF_DEFAULT_OPTS=' --reverse --prompt="→ " --height="30%"'
7071
7172# Go env
7273export GOPROXY=direct
@@ -477,7 +478,7 @@ function k8s_namespace() {
477478
478479 if [[ $# -eq 0 ]] ; then
479480 if [[ -f " $HOME /.bin/fzf" || -d " $HOME /.fzf" ]] ; then
480- ns=$( kubectl get ns | grep -vE ' (kube|yandex)' | fzf --header-lines=1 --height 20% --reverse | awk ' {print $1}' )
481+ ns=$( kubectl get ns | grep -vE ' (kube|yandex)' | fzf --header-lines=1 --cycle --preview= ' kubectl describe ns {1} ' | awk ' {print $1}' )
481482
482483 if [[ -z " $ns " ]] ; then
483484 return 1
@@ -515,7 +516,7 @@ function k8s_log() {
515516
516517 if [[ " ${1: 0: 1} " == " -" || -z " $resource " ]] ; then
517518 if [[ -f " $HOME /.bin/fzf" || -d " $HOME /.fzf" ]] ; then
518- resource=$( kubectl get pods | fzf --header-lines=1 --height 20% --reverse | awk ' {print $1}' )
519+ resource=$( kubectl get pods | fzf --header-lines=1 --cycle --preview= ' kubectl describe pod {1} ' | awk ' {print $1}' )
519520
520521 if [[ -z " $resource " ]] ; then
521522 return 1
@@ -554,7 +555,7 @@ function k8s_shell() {
554555
555556 if [[ $# -eq 0 ]] ; then
556557 if [[ -f " $HOME /.bin/fzf" || -d " $HOME /.fzf" ]] ; then
557- pod=$( kubectl get pods --field-selector=' status.phase=Running' | fzf --header-lines=1 --height 20% --reverse | awk ' {print $1}' )
558+ pod=$( kubectl get pods --field-selector=' status.phase=Running' | fzf --header-lines=1 --cycle --preview= ' kubectl describe pod {1} ' | awk ' {print $1}' )
558559
559560 if [[ -z " $pod " ]] ; then
560561 return 1
You can’t perform that action at this time.
0 commit comments