diff --git a/Makefile b/Makefile index 3d1bde3..94174b6 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,108 @@ -path = ~/.shellrc/bin/scripts +install_path = /usr/local/bin +links_path = ~/.shellrc/bin/scripts +local_man_path = ~/.shellrc/var/man/man1 +system_man_path = /usr/local/share/man/man1 + +SRC := scripts +MAN := man + find := $(shell { command -v gfind || command -v find; } 2>&-) -all: install +SCRIPTS := $(wildcard $(SRC)/kubectl-*) +MAN_PAGES := $(subst $(SRC),$(MAN),$(basename $(wildcard $(SRC)/kubectl-*))) +MAN_FILES := $(addsuffix ".1", $(MAN_PAGES)) + +# -------------------------------------------------------------------------------------------------- + +# copy_files [FILES] TO/ +define copy_files + @for file in $(1); do \ + cp -v $$(realpath -- $$file) $(2)/$$(basename $$file); \ + done +endef + +# link_files [FILES] TO/ +define link_files + @for file in $(1); do \ + ln -f -s -v $$(realpath -- $$file) $(2)/$$(basename $$file); \ + done +endef + +# delete_files [FILES] FROM/ +define delete_files + @for file in $(1); do \ + rm -v $(2)/$$(basename $$file) || :; \ + done +endef + +# -------------------------------------------------------------------------------------------------- + +help: ## Display this help. + @awk 'BEGIN { \ + FS = ":.*##"; \ + printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n" \ + } \ + /^[a-zA-Z_-]+:.*?##/ { \ + printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 \ + } \ + END { \ + print \ + }' \ + $(MAKEFILE_LIST) + +# -------------------------------------------------------------------------------------------------- + +man: $(MAN_PAGES) ## Generate man pages. +links: man make_local_dirs make_links link_man_pages ## Install kubectl scripts by creating links. +install: man copy_bin copy_man_pages ## Install kubectl scripts to /usr/local/bin. +uninstall: rm_bin rm_links rm_man_pages rm_man_links rm_local_dirs ## Uninstall kubectl scripts. + +# -------------------------------------------------------------------------------------------------- + +%: $(BIN)/% +$(MAN)/%: $(SRC)/% + pod2man --section 1 --release "1.0.0" --center "KUBECTL EXTENSIONS" $< > $@.1 + +# -------------------------------------------------------------------------------------------------- + +make_man_directory: + @mkdir -p $(system_man_path) + +copy_bin: + $(call copy_files, $(SCRIPTS), $(install_path)) + +rm_bin: + $(call delete_files, $(SCRIPTS), $(install_path)) + +copy_man_pages: make_man_directory + $(call copy_files, $(MAN_FILES), $(system_man_path)) + +rm_man_pages: make_man_directory + $(call delete_files, $(MAN_FILES), $(system_man_path)) + +# -------------------------------------------------------------------------------------------------- + +make_local_dirs: + mkdir -p -v $(links_path) + mkdir -p -v $(local_man_path) -mkdir: - @mkdir -p $(path) +rm_local_dirs: + rmdir $(links_path) 2>&-; : + rmdir $(local_man_path) 2>&-; : -rmdir: - @rmdir $(path) 2>&-; : +make_links: + $(call link_files, $(SCRIPTS), $(links_path)) -install: mkdir - @$(find) . \ - -maxdepth 1 \ - \( -type f -o -type l \) \ - -executable \ - -exec basename {} \; \ - | while read -r line; do \ - ln -v -s $$(realpath -- $$line) $(path)/$$line 2>&-; \ - done; \ - true +rm_links: + $(call delete_files, $(SCRIPTS), $(links_path)) -rmlinks: - @$(find) . \ - -maxdepth 1 \ - \( -type f -o -type l \) \ - -executable \ - -exec basename {} \; \ - | xargs -IF rm -fv $(path)/F +link_man_pages: + $(call link_files, $(MAN_FILES), $(local_man_path)) -uninstall: rmlinks rmdir +rm_man_links: + $(call delete_files, $(MAN_FILES), $(local_man_path)) -clean: uninstall +# -------------------------------------------------------------------------------------------------- -.PHONY: all mkdir rmdir install uninstall clean +.PHONY: all make_local_dirs rm_local_dirs links install uninstall diff --git a/README.md b/README.md index d38174b..abaf246 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,15 @@ otherwise is specified. ## Installing -A command +To install scripts in the `/usr/local/bin` directory run the following command: - $ make install + $ make install -will create the symbolic link for each script in the \ directory. +The command + + $ make links + +will create the symbolic link for each script in the `links_path` directory. # Index diff --git a/man/kubectl-compare.1 b/man/kubectl-compare.1 new file mode 100644 index 0000000..9a8e306 --- /dev/null +++ b/man/kubectl-compare.1 @@ -0,0 +1,185 @@ +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "KUBECTL-COMPARE 1" +.TH KUBECTL-COMPARE 1 "2020-10-26" "1.0.0" "KUBECTL EXTENSIONS" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +kubectl\-compare allows to juxtapose kubernetes resources with any diff\-like utilities. +.SH "USAGE" +.IX Header "USAGE" +.Vb 5 +\& kubectl compare [\-n|\-\-namespace NAMESPACE] [\-t|\-\-type] [\-e|\-\-edit|\-v|\-\-visual] name1 name2 +\&or +\& kubectl compare [\-e|\-\-edit|\-v|\-\-visual] namespace/type/name1 namespace/type/name2 +\&or +\& kubectl compare [\-e|\-\-edit|\-v|\-\-visual] namespace/type/name1 namespace/type/name2 namespace/type/name3 ... +.Ve +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 3 +\& \-n \-\-namespace Kubernetes namespace for search (\*(Aqdefault\*(Aq by default). +\& \-t \-\-type Kubernetes resource\*(Aqs type, e.g. pod, svc, configmap, etc (\*(Aqpod\*(Aq by default). +\& \-e \-\-edit, \-v \-\-visual Open diff in visual editor (e.g. vimdiff). +.Ve +.PP +Set \fB\s-1VISUAL_DIFF_CMD\s0\fR environment variable or provide its value in script's +file (kubectl-compare) to specify utility which will be used. +.PP +To specify main diff program set \fB\s-1DIFF_CMD\s0\fR variable (its default value is \fI'diff +\&\-u \-\-color=always'\fR). +.PP +Use something like \fIdiff3\fR to compare 3 manifests. +.SH "EXAMPLE" +.IX Header "EXAMPLE" +.Vb 7 +\& $ kubectl compare \-n zookeeper \-t pod zookeeper\-0 zookeeper\-1 +\& $ kubectl compare \-n zookeeper pod/zookeeper\-0 pod/zookeeper\-1 +\& $ kubectl compare zookeeper/pod/zookeeper\-0 zookeeper/pod/zookeeper\-1 +\& ^ ^ ^ +\& [namespace]\-\-\-+ | | +\& [type]\-\-\-\-+ | +\& [name]\-\-+ +\& +\& $ kubectl compare zookeeper/pod/zookeeper\-{0,1,2} +.Ve +.SH "BUGS" +.IX Header "BUGS" +If you find a bug, please report it at \fB\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +envrm \fB\fR. diff --git a/man/kubectl-http.1 b/man/kubectl-http.1 new file mode 100644 index 0000000..1b8977b --- /dev/null +++ b/man/kubectl-http.1 @@ -0,0 +1,165 @@ +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "KUBECTL-HTTP 1" +.TH KUBECTL-HTTP 1 "2020-10-26" "1.0.0" "KUBECTL EXTENSIONS" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +kubectl\-http is a wrapper for `kubectl proxy' command which shows links to resources. +.SH "USAGE" +.IX Header "USAGE" +kubectl http [all|pods|services] [standard kubectl selectors] +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 2 +\& \-h \-\-help = show this help +\& \-hl \-\-hyperlinks = use terminal emulator\*(Aqs hyperlinks feature +.Ve +.PP +Basic selectors: +.PP +.Vb 3 +\& all pods and services +\& po pod pods pods +\& svc service services services +.Ve +.SH "BUGS" +.IX Header "BUGS" +If you find a bug, please report it at \fB\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +envrm \fB\fR. diff --git a/man/kubectl-ingress.1 b/man/kubectl-ingress.1 new file mode 100644 index 0000000..015045a --- /dev/null +++ b/man/kubectl-ingress.1 @@ -0,0 +1,151 @@ +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "KUBECTL-INGRESS 1" +.TH KUBECTL-INGRESS 1 "2020-10-26" "1.0.0" "KUBECTL EXTENSIONS" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +kubectl\-ingress is a wrapper for `kubectl get ingress' command which makes links clickable. +.SH "USAGE" +.IX Header "USAGE" +kubectl ingress [standard kubectl selectors] +.SH "BUGS" +.IX Header "BUGS" +If you find a bug, please report it at \fB\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +envrm \fB\fR. diff --git a/man/kubectl-secret.1 b/man/kubectl-secret.1 new file mode 100644 index 0000000..637f23b --- /dev/null +++ b/man/kubectl-secret.1 @@ -0,0 +1,158 @@ +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "KUBECTL-SECRET 1" +.TH KUBECTL-SECRET 1 "2020-10-26" "1.0.0" "KUBECTL EXTENSIONS" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +kubectl\-secret is a wrapper for `kubectl get secret' to decoding secrets automatically. +.SH "USAGE" +.IX Header "USAGE" +kubectl secret [\-h|\-d|\-s] [standard kubectl selectors] +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 3 +\& \-h \-\-help = show this help +\& \-s \-\-simple = show only secrets +\& \-d \-\-decode = show decoded data as plain text (by default it shows under the link) +.Ve +.SH "BUGS" +.IX Header "BUGS" +If you find a bug, please report it at \fB\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +envrm \fB\fR. diff --git a/man/kubectl-secrets.1 b/man/kubectl-secrets.1 new file mode 100644 index 0000000..f8d038e --- /dev/null +++ b/man/kubectl-secrets.1 @@ -0,0 +1,158 @@ +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "KUBECTL-SECRETS 1" +.TH KUBECTL-SECRETS 1 "2020-10-26" "1.0.0" "KUBECTL EXTENSIONS" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +kubectl\-secret is a wrapper for `kubectl get secret' to decoding secrets automatically. +.SH "USAGE" +.IX Header "USAGE" +kubectl secret [\-h|\-d|\-s] [standard kubectl selectors] +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 3 +\& \-h \-\-help = show this help +\& \-s \-\-simple = show only secrets +\& \-d \-\-decode = show decoded data as plain text (by default it shows under the link) +.Ve +.SH "BUGS" +.IX Header "BUGS" +If you find a bug, please report it at \fB\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +envrm \fB\fR. diff --git a/kubectl-compare b/scripts/kubectl-compare similarity index 57% rename from kubectl-compare rename to scripts/kubectl-compare index 9e8d97d..ebca8a4 100755 --- a/kubectl-compare +++ b/scripts/kubectl-compare @@ -16,65 +16,77 @@ # along with this program. If not, see . # -set -o pipefail +: <<'MAN' -if [ -z "$DIFF_CMD" ]; then - DIFF_CMD="diff -u --color=always" -fi +=head1 NAME -if [ -z "$VISUAL_DIFF_CMD" ]; then - VISUAL_DIFF_CMD="vim -d --cmd 'autocmd BufRead * set filetype=yaml'" -fi +kubectl-compare allows to juxtapose kubernetes resources with any diff-like utilities. -# Default Kubernetes namespace -NAMESPACE=default +=head1 USAGE -# Default Kubernetes resource -TYPE=pod + kubectl compare [-n|--namespace NAMESPACE] [-t|--type] [-e|--edit|-v|--visual] name1 name2 +or + kubectl compare [-e|--edit|-v|--visual] namespace/type/name1 namespace/type/name2 +or + kubectl compare [-e|--edit|-v|--visual] namespace/type/name1 namespace/type/name2 namespace/type/name3 ... -usage() { -cat < environment variable or provide its value in script's +file (kubectl-compare) to specify utility which will be used. - $(basename "$0") [-n|--namespace NAMESPACE] [-t|--type] [-e|--edit|-v|--visual] name1 name2 - or - $(basename "$0") [-e|--edit|-v|--visual] namespace/type/name1 namespace/type/name2 - or - $(basename "$0") [-e|--edit|-v|--visual] namespace/type/name1 namespace/type/name2 namespace/type/name3 ... +To specify main diff program set B variable (its default value is I<'diff +-u --color=always'>). - OPTIONS: - -n --namespace Kubernetes namespace for search («default» by default). +Use something like I to compare 3 manifests. - -t --type Kubernetes resource's type, e.g. pod, svc, configmap, etc («pod» by default). +=head1 EXAMPLE - -e --edit, -v --visual Open diff in visual editor (e.g. vimdiff). - Set VISUAL_DIFF_CMD environment variable or - provide its value in script's file ($(basename "$0")) to - specify utility which will be used. + $ kubectl compare -n zookeeper -t pod zookeeper-0 zookeeper-1 + $ kubectl compare -n zookeeper pod/zookeeper-0 pod/zookeeper-1 + $ kubectl compare zookeeper/pod/zookeeper-0 zookeeper/pod/zookeeper-1 + ^ ^ ^ + [namespace]---+ | | + [type]----+ | + [name]--+ - To specify main diff program set DIFF_CMD variable (its default value is «diff -u --color=always»). + $ kubectl compare zookeeper/pod/zookeeper-{0,1,2} - Use something like diff3 to compare 3 manifests. +=head1 BUGS - EXAMPLE: +If you find a bug, please report it at B>. - $ $(basename "$0") -n zookeeper -t pod zookeeper-0 zookeeper-1 - $ $(basename "$0") -n zookeeper pod/zookeeper-0 pod/zookeeper-1 - $ $(basename "$0") zookeeper/pod/zookeeper-0 zookeeper/pod/zookeeper-1 - ^ ^ ^ - [namespace]───┘ │ │ - [type]────┘ │ - [name]──┘ +=head1 AUTHORS - $ $(basename "$0") zookeeper/pod/zookeeper-{0,1,2} +envrm B>. -EOF +=cut +MAN -exit "${1:0}" +set -o pipefail + +if [ -z "$DIFF_CMD" ]; then + DIFF_CMD="diff -u --color=always" +fi + +if [ -z "$VISUAL_DIFF_CMD" ]; then + VISUAL_DIFF_CMD="vim -d --cmd 'autocmd BufRead * set filetype=yaml'" +fi + +# Default Kubernetes namespace +NAMESPACE=default + +# Default Kubernetes resource +TYPE=pod + +usage() { + sed -E -n '/^.*MAN/,/^MAN$/{//!p;}; /^MAN$/q' "$0" | sed -E 's/=head. |[LIBC]<|\b>*//g; /=cut/d' + exit "${1:0}" } die() { diff --git a/kubectl-http b/scripts/kubectl-http similarity index 86% rename from kubectl-http rename to scripts/kubectl-http index 8495307..f8e87e3 100755 --- a/kubectl-http +++ b/scripts/kubectl-http @@ -16,6 +16,38 @@ # along with this program. If not, see . # +: <<'MAN' + +=head1 NAME + +kubectl-http is a wrapper for I<`kubectl proxy'> command which shows links to resources. + +=head1 USAGE + +kubectl http [all|pods|services] [standard kubectl selectors] + +=head1 OPTIONS + + -h --help = show this help + -hl --hyperlinks = use terminal emulator's hyperlinks feature + +Basic selectors: + + all pods and services + po pod pods pods + svc service services services + +=head1 BUGS + +If you find a bug, please report it at B>. + +=head1 AUTHORS + +envrm B>. + +=cut +MAN + rstc="\033[00m" blue="\033[1;36m" green="\033[1;32m" @@ -52,20 +84,8 @@ hr() { } usage() { - echo -e "$(basename "$0") is a wrapper for \`kubectl proxy' command which shows links to resources.\n" - echo -e "USAGE: $(basename "$0" | tr '-' ' ') [all|pods|services] [standard kubectl selectors]\n" - - echo -e "Command line arguments:" - echo -e " -h --help show this help" - echo -e " -hl --hyperlinks use terminal emulator's hyperlinks feature" - - echo - echo -e "Basic selectors:" - echo -e " all pods and services" - echo -e " po pod pods pods" - echo -e " svc service services services" + sed -E -n '/^.*MAN/,/^MAN$/{//!p;}; /^MAN$/q' "$0" | sed -E 's/=head. |[LIBC]<|\b>*//g; /=cut/d' - echo exit "${1:-0}" } diff --git a/kubectl-ingress b/scripts/kubectl-ingress similarity index 72% rename from kubectl-ingress rename to scripts/kubectl-ingress index 54d71d0..3753e6e 100755 --- a/kubectl-ingress +++ b/scripts/kubectl-ingress @@ -16,10 +16,26 @@ # along with this program. If not, see . # -## -## kubectl-ingress is a wrapper for 'kubectl get ingress` command which -## makes links clickable. -## +: <<'MAN' + +=head1 NAME + +kubectl-ingress is a wrapper for I<`kubectl get ingress'> command which makes links clickable. + +=head1 USAGE + +kubectl ingress [standard kubectl selectors] + +=head1 BUGS + +If you find a bug, please report it at B>. + +=head1 AUTHORS + +envrm B>. + +=cut +MAN echo -e "$(sed 's!(([[:alpha:]](-?[[:alnum:]])*)\.)+[[:alpha:]]{2,}!\\e]8;;http://\0\\e\\\\\0\\e]8;;\\e\\!g; s!((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])!\\e]8;;http://\0\\e\\\\\0\\e]8;;\\e\\!g diff --git a/kubectl-secret b/scripts/kubectl-secret similarity index 74% rename from kubectl-secret rename to scripts/kubectl-secret index da8ce07..12037b3 100755 --- a/kubectl-secret +++ b/scripts/kubectl-secret @@ -16,15 +16,34 @@ # along with this program. If not, see . # +: <<'MAN' +=head1 NAME + +kubectl-secret is a wrapper for I<`kubectl get secret'> to decoding secrets automatically. + +=head1 USAGE + +kubectl secret [-h|-d|-s] [standard kubectl selectors] + +=head1 OPTIONS + + -h --help = show this help + -s --simple = show only secrets + -d --decode = show decoded data as plain text (by default it shows under the link) + +=head1 BUGS + +If you find a bug, please report it at B>. + +=head1 AUTHORS + +envrm B>. + +=cut +MAN + usage() { - echo -e "$(basename "$0") is a wrapper for \`kubectl get secret' to decoding secrets automatically.\n" - echo -e "USAGE: $(basename "$0" | tr '-' ' ') [-h|-d|-s] [standard kubectl selectors]\n" - - echo -e "Command line arguments:" - echo -e " -h --help show this help" - echo -e " -s --simple show only secrets" - echo -e " -d --decode show decoded data as plain text" - echo -e " (by default it shows under the link)\n" + sed -E -n '/^.*MAN/,/^MAN$/{//!p;}; /^MAN$/q' "$0" | sed -E 's/=head. |[LIBC]<|\b>*//g; /=cut/d' exit "${1:-0}" } diff --git a/kubectl-secrets b/scripts/kubectl-secrets similarity index 100% rename from kubectl-secrets rename to scripts/kubectl-secrets