-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzoauhelper
executable file
·63 lines (52 loc) · 2.36 KB
/
zoauhelper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
VER='0.01'
#---------------------------------------------------#
# Name: zoauhelper #
# #
# Purpose: Provide a helper for zoau commands #
# #
# Dependencies: gum #
# #
# Syntax: zoauhelper #
# #
# Author/Contributors: #
# Lionel B. Dyck ([email protected]) #
# #
# Change History (current on top): #
# 2024/05/18 LBD - 0.01 Creation #
#---------------------------------------------------#
# Repository: github.com/lbdyck/prompters #
#---------------------------------------------------#
# Copyleft by Lionel B. Dyck 2024 #
#---------------------------------------------------#
#----------------------------------------------------------------#
# Define the color for the banner #
# 5 - purple #
# 12 - blue shade #
# 33 - darker blue #
# 46 - green #
# 51 - turq shade #
#----------------------------------------------------------------#
COLOR=51
#----------------------------------------------------------------#
# Define export values that we need to look nice #
#----------------------------------------------------------------#
export GUM_INPUT_PROMPT_FOREGROUND="#$COLOR"
export GUM_INPUT_PLACEHOLDER=". . ."
export GUM_IMPORT_PROMPT="* "
export TERM=xterm-256color
clear
gum style \
--foreground $COLOR --border-foreground $COLOR --border double \
--align center --width 50 --margin "1 2" --padding "2 4" \
'z/OS Automation Utilities (zoau) Helper' $VER
dir=$(dirname $(command -v dls))
zoau=$(ls $dir | \
gum choose --header.foreground="$COLOR" \
--height=18 \
--header "Select zoau command for information")
if [ -z "$zoau" ]; then
echo 'No selections made - exiting . . .'
exit 0
fi
man $zoau | gum pager