ssh tunnelier to use qolop. further ansitable touchup

This commit is contained in:
ville rantanen
2017-08-20 16:03:55 +03:00
parent 101dbf2e19
commit 2da190e033
2 changed files with 21 additions and 18 deletions

View File

@@ -179,21 +179,22 @@ if [[ "$0" = "${BASH_SOURCE[0]}" ]]; then
${_R}Co${_G}lo${_B}rs${_W} and ${_S}Mo${_U}di${_st}fi${_u}er${_ic}s${_Z} ESC[Xm or ESC[X;Y;Zm ${_R}Co${_G}lo${_B}rs${_W} and ${_S}Mo${_U}di${_st}fi${_u}er${_ic}s${_Z} ESC[Xm or ESC[X;Y;Zm
${_S}====================${_Z} ${_S}====================${_Z}
0 z Z Clear format 0 z Z Clear format
1 S ${_S}Strong/Bold ${_Z} 30 k ${_k}Black ${_Z}1 K ${_K}Black ${_Z}40 bk ${_bk}Black${_Z} 1 S ${_S}Strong/Bold ${_Z} 30 k ${_k}Black ${_Z}1 K ${_K}Black ${_Z}40 bk ${_w}${_bk}Black ${_Z}
2 s ${_s}Weak/Bold off ${_Z} 31 r ${_r}Red ${_Z}1 R ${_R}Red ${_Z}41 br ${_br}Red${_Z} 2 s ${_s}Weak/Bold off ${_Z} 31 r ${_r}Red ${_Z}1 R ${_R}Red ${_Z}41 br ${_k}${_br}Red ${_Z}
4 U ${_U}Underline ${_Z} 32 g ${_g}Green ${_Z}1 G ${_G}Green ${_Z}42 bg ${_bg}Green${_Z} 4 U ${_U}Underline ${_Z} 32 g ${_g}Green ${_Z}1 G ${_G}Green ${_Z}42 bg ${_k}${_bg}Green ${_Z}
24 u ${_u}Underline off ${_Z} 33 y ${_y}Yellow ${_Z}1 Y ${_Y}Yellow ${_Z}43 by ${_by}Yellow${_Z} 24 u ${_u}Underline off ${_Z} 33 y ${_y}Yellow ${_Z}1 Y ${_Y}Yellow ${_Z}43 by ${_k}${_by}Yellow ${_Z}
7 ic ${_ic}Inverse color ${_Z} 34 b ${_b}Blue ${_Z}1 B ${_B}Blue ${_Z}44 bb ${_bb}Blue${_Z} 7 ic ${_ic}Inverse color ${_Z} 34 b ${_b}Blue ${_Z}1 B ${_B}Blue ${_Z}44 bb ${_k}${_bb}Blue ${_Z}
27 of ${_io}Inverse off ${_Z} 35 m ${_m}Magenta ${_Z}1 M ${_M}Magenta ${_Z}45 bm ${_bm}Magenta${_Z} 27 of ${_io}Inverse off ${_Z} 35 m ${_m}Magenta ${_Z}1 M ${_M}Magenta ${_Z}45 bm ${_k}${_bm}Magenta ${_Z}
9 st ${_st}Strike ${_Z} 36 c ${_c}Cyan ${_Z}1 C ${_C}Cyan ${_Z}46 bc ${_bc}Cyan${_Z} 9 st ${_st}Strike ${_Z} 36 c ${_c}Cyan ${_Z}1 C ${_C}Cyan ${_Z}46 bc ${_k}${_bc}Cyan ${_Z}
29 so ${_so}Strike off ${_Z} 37 w ${_w}White ${_Z}1 W ${_W}White ${_Z}47 bw ${_bw}White${_Z} 29 so ${_so}Strike off ${_Z} 37 w ${_w}White ${_Z}1 W ${_W}White ${_Z}47 bw ${_k}${_bw}White ${_Z}
Enter raw color code sequence with _qCode function Enter raw color code sequence with _qCode function
${_S}Clearing and movement${_Z} ESC[X or ESC[1X ${_S}Clearing and movement${_Z} ESC[X or ESC[1X
${_S}=====================${_Z} ${_S}=====================${_Z}
2J CLR Clear screen 2J CLR Clear screen
2J ;H CLRSCR _qClr() Clear screen and cursor to upper left 2J ;H CLRSCR _qClr() Clear screen, move cursor to origo
K CLREND Clear to end of line K CLREND Clear to end of line
1K CLRBEG Clear to beginning of line 1K CLRBEG Clear to beginning of line
_qReset() Reset terminal
s _qPos save Save location u _qPos restore Restore location s _qPos save Save location u _qPos restore Restore location
A _qPos up Up E _qPos lineup Up line A _qPos up Up E _qPos lineup Up line

View File

@@ -33,12 +33,14 @@ done
echo -e "# example:\n -L 8888:localhost:8888 servername" > "$CONF" echo -e "# example:\n -L 8888:localhost:8888 servername" > "$CONF"
} }
number_re='^[0-9]+$' number_re='^[0-9]+$'
# import qolop
colZ="\033[0m" _qCol(){ true; } # incase qolop missing
colTitle="\033[0;1;32m" . qolop &>/dev/null
colRow="\033[0;1m" colZ=$( _qCol z )
colMenu="\033[0;33m" colTitle=$( _qCol z G )
colWarn="\033[0;1;31m" colRow=$( _qCol z S )
colMenu=$( _qCol z y )
colWarn=$( _qCol z R )
function fpgrep() { function fpgrep() {
pgrep -x -u $UID "$@" | xargs --no-run-if-empty ps -o pid,bsdstart,args; pgrep -x -u $UID "$@" | xargs --no-run-if-empty ps -o pid,bsdstart,args;