@@ -1,12 +1,15 @@
NAME
+
Term::Menus - Create Powerful Terminal, Console and CMD Enviroment Menus
SYNOPSIS
+
"use Term::Menus;"
see METHODS section below
DESCRIPTION
+
Term::Menus allows you to create powerful Terminal, Console and CMD
environment menus. Any perl script used in a Terminal, Console or CMD
environment can now include a menu facility that includes sub-menus,
@@ -40,13 +43,13 @@ DESCRIPTION
Please Pick an Item:
- 1. First Item
- 2. Second Item
- 3. Third Item
+ 1 First Item
+ 2 Second Item
+ 3 Third Item
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 2 >-<ENTER>----------------------------------
@@ -67,47 +70,43 @@ DESCRIPTION
Please Pick an Item:
- 1. arch
- 2. ash
- 3. awk
- 4. basename
- 5. bash
- 6. cat
- 7. chgrp
- 8. chmod
- 9. chown
- 10. cp
-
- 93 Total Choices
+ 1 arch
+ 2 ash
+ 3 awk
+ 4 basename
+ 5 bash
+ 6 cat
+ 7 chgrp
+ 8 chmod
+ 9 chown
+ 10 cp
- Press ENTER (or "d") to scroll downward
+ a. Select All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--<ENTER>--------------------------------------
Please Pick an Item:
- 11. cpio
- 12. csh
- 13. cut
- 14. date
- 15. dd
- 16. df
- 17. echo
- 18. ed
- 19. egrep
- 20. env
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
+ 11 cpio
+ 12 csh
+ 13 cut
+ 14 date
+ 15 dd
+ 16 df
+ 17 echo
+ 18 ed
+ 19 egrep
+ 20 env
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 14 >-<ENTER>----------------------------------
@@ -139,27 +138,22 @@ DESCRIPTION
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 3 >-<ENTER>----------------------------------
@@ -169,27 +163,22 @@ DESCRIPTION
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- * 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- * 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ * 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ * 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- Press ENTER (or "d") to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< f >-<ENTER>----------------------------------
@@ -248,27 +237,22 @@ DESCRIPTION
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -299,10 +283,7 @@ DESCRIPTION
This is a BANNER ONLY display.
-
- (Type 'quit' to Quit)
-
- Press ENTER to continue ...
+ ([ESC] to Quit) Press ENTER to continue ...
* You want to use perl subroutines to create the text items and/or
banner:
@@ -366,38 +347,33 @@ DESCRIPTION
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer for bash :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -482,38 +458,33 @@ DESCRIPTION
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer for bash :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -539,6 +510,7 @@ DESCRIPTION
module.
METHODS
+
pick - create a simple menu
$pick = &pick ($list|\@list|['list',...],[$Banner]);
@@ -801,27 +773,22 @@ METHODS
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- * 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- * 9. /bin Utility - chown
- 10. /bin Utility - cp
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ * 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ * 9 /bin Utility - chown
+ 10 /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
* Select => 'One' --or-- 'Many'
@@ -841,26 +808,22 @@ METHODS
The user sees ==>
- d 1. bin
- d 2. blib
- d 3. dist
- d 4. inc
- d 5. lib
- d 6. Module
- d 7. t
- 8. briangreat2.txt
- * 9. ChangeLog
- 10. close.perl
-
- a. Select All. f. Finish.
+ d 1 bin
+ d 2 blib
+ d 3 dist
+ d 4 inc
+ d 5 lib
+ d 6 Module
+ d 7 t
+ 8 briangreat2.txt
+ * 9 ChangeLog
+ 10 close.perl
- 49 Total Choices
+ a. Select All f. FINISH
+ ___
+ 49 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
* Exclude => 'Char String' --or-- Perl regular expression - qr/.../
@@ -975,27 +938,22 @@ METHODS
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
NOTE: "]C[" can be used as a shorthand for "]Convey[".
@@ -1046,38 +1004,33 @@ METHODS
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- Press ENTER (or "d") to scroll downward
+ a. Select All c. Clear All f. FINISH
- OR "u" to scroll upward (Type "quit" to quit)
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -1150,40 +1103,40 @@ METHODS
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Is bash Good or Bad? :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
Who commented on bash? :
- 1. Bob said bash is a Good Utility!
- 2. Mary said bash is a Good Utility!
+ 1 Bob said bash is a Good Utility!
+ 2 Mary said bash is a Good Utility!
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 2 >-<ENTER>----------------------------------
@@ -1412,6 +1365,7 @@ METHODS
sub selected { print "\n SELECTED ITEM = $_[0]\n";return $_[0] }
ANONYMOUS SUBROUTINES AND MACROS
+
Term::Menus macros can be used *directly* in the body of anonymous
subroutines! Ordinary subroutines can be used as illustrated above of
course, but the macro values can only be passed as arguments to ordinary
@@ -1500,6 +1454,7 @@ ANONYMOUS SUBROUTINES AND MACROS
print " \nSELECTION = $selection\n";
RECURSIVELY CALLED MENUS
+
There are occasions where it is desirable to re-use the same Menu
template/hash configuration with dynamically discovered data. One
obvious example of this is navigating directory trees. Each subsequent
@@ -1652,6 +1607,7 @@ RECURSIVELY CALLED MENUS
}
USAGE and NAVIGATION
+
Usage of "&pick()" and/or "&Menu()" during the runtime of a script in
which one or both are included, is simple and intuitive. Nearly
everything the end user needs in terms of instruction is included
@@ -1683,16 +1639,11 @@ USAGE and NAVIGATION
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
@@ -1700,12 +1651,12 @@ USAGE and NAVIGATION
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
In the above example, suppose that the user "fat-fingered" his/her
choice, and really didn't want to "bash" bash, but wanted to bash
@@ -1722,12 +1673,12 @@ USAGE and NAVIGATION
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< > >-<ENTER>-----------------------------
@@ -1735,27 +1686,22 @@ USAGE and NAVIGATION
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- - 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ - 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- Press ENTER (or "d") to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
Note in the above example the Dash ' - ' in front of item 5. This
informs the user that s/he had previously selected this item. To
@@ -1784,16 +1730,11 @@ USAGE and NAVIGATION
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
View Sorted Items ' % '
@@ -1808,28 +1749,22 @@ USAGE and NAVIGATION
Choose a /bin Utility :
- * 1. [.exe
- * 2. 2to3
- 3. 2to3-3.2
- * 4. 411toppm.exe
- 5. a2p.exe
- 6. aaflip.exe
- 7. aclocal
- * 8. aclocal-1.10
- 9. aclocal-1.11
- * 10. aclocal-1.12
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 1925 Total Choices
+ * 1 [.exe
+ * 2 2to3
+ 3 2to3-3.2
+ * 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ * 8 aclocal-1.10
+ 9 aclocal-1.11
+ * 10 aclocal-1.12
- Press ENTER (or 'd') to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< % >-<ENTER>----------------------------------
@@ -1848,19 +1783,13 @@ USAGE and NAVIGATION
1808. Xdmx.exe
1815. Xephyr.exe
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 1925 Total Choices
-
- Press ENTER (or 'd') to scroll downward
-
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
And if we choose to enter ' % ' *again*
@@ -1870,30 +1799,24 @@ USAGE and NAVIGATION
Choose a /bin Utility :
- 1925. znew
- 1924. zmore
- 1923. zless
- 1922. zipsplit.exe
- 1921. zipnote.exe
- 1920. zipinfo.exe
- 1919. zipgrep
- 1918. zipcloak.exe
- 1917. zip.exe
- 1916. zgrep
+ 1925 znew
+ 1924 zmore
+ 1923 zless
+ 1922 zipsplit.exe
+ 1921 zipnote.exe
+ 1920 zipinfo.exe
+ 1919 zipgrep
+ 1918 zipcloak.exe
+ 1917 zip.exe
+ 1916 zgrep
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 1925 Total Choices
-
- Press ENTER (or 'd') to scroll downward
-
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
This submenu of sorted selections works just like any other menu.
The user can deselect an item, clear all items, re-choose all items,
@@ -1902,7 +1825,7 @@ USAGE and NAVIGATION
deselected in the sorted menu, Item 1. will also be deselected in
the parent menu. Navigating back to the parent is necessary - the
menu will not generate results from a sort menu. Use either the
- LEFTARROW ' < ' key or Finish key ' F or f ' to return to the parent
+ LEFTARROW ' < ' key or FINISH key ' F or f ' to return to the parent
menu, and then continue your menu activities there.
View Summary of Selected Items ' * '
@@ -1919,28 +1842,22 @@ USAGE and NAVIGATION
Choose a /bin Utility :
- * 1. [.exe
- 2. 2to3
- * 3. 2to3-3.2
- 4. 411toppm.exe
- 5. a2p.exe
- 6. aaflip.exe
- 7. aclocal
- 8. aclocal-1.10
- * 9. aclocal-1.11
- 10. aclocal-1.12
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 1925 Total Choices
+ * 1 [.exe
+ 2 2to3
+ * 3 2to3-3.2
+ 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ 8 aclocal-1.10
+ * 9 aclocal-1.11
+ 10 aclocal-1.12
- Press ENTER (or 'd') to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< * >-<ENTER>----------------------------------
@@ -1948,19 +1865,18 @@ USAGE and NAVIGATION
Choose a /bin Utility :
- * 1. [.exe
- * 3. 2to3-3.2
- * 9. aclocal-1.11
- * 11. aclocal-1.13
+ * 1 [.exe
+ * 3 2to3-3.2
+ * 9 aclocal-1.11
+ * 11 aclocal-1.13
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
- (Type 'quit' to Quit)
+ ([F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
This submenu of summary selections works just like any other menu.
The user can deselect an item, clear all items, re-choose all items,
@@ -1969,13 +1885,15 @@ USAGE and NAVIGATION
deselected in the summary menu, Item 1. will also be deselected in
the parent menu. Navigating back to the parent is necessary - the
menu will not generate results from a summary menu. Use either the
- LEFTARROW ' < ' key or Finish key ' F or f ' to return to the parent
+ LEFTARROW ' < ' key or FINISH key ' F or f ' to return to the parent
menu, and then continue your menu activities there.
AUTHOR
+
Brian M. Kelly <Brian.Kelly@fullautosoftware.net>
COPYRIGHT
+
Copyright (C) 2000-2014 by Brian M. Kelly.
This program is free software; you can redistribute it and/or modify it
@@ -15,7 +15,7 @@ package Term::Menus;
## See user documentation at the end of this file. Search for =head
-our $VERSION = '2.66';
+our $VERSION = '2.79';
use 5.006;
@@ -221,7 +221,7 @@ use vars qw(@EXPORT @EXPORT_OK %term_input %test %Dump %tosspass %b
%DB_DATABASE_LOCKING %DB_FCNTL_LOCKING
%DB_TXN_WRITE_NOSYNC %DB_ENV_NO_OUTPUT_SET
%DB_user_BEGIN %DB_EVENT_WRITE_FAILED
- %DB_MPOOL_NOLOCK %DB_VERSION_MINOR
+ %DB_MPOOL_NOLOCK %DB_VERSION_MINOR %transform_mbii
%DB_REP_CREATE %DB_REP_DEFAULT_PRIORITY
%DB_REP_LEASE_TIMEOUT %DB_REP_CLIENT
%DB_TXN_LOCK_OPTIMIST %DB_LOCK_DEADLOCK
@@ -234,7 +234,7 @@ use vars qw(@EXPORT @EXPORT_OK %term_input %test %Dump %tosspass %b
%DB_ENV_TXN_WRITE_NOSYNC %DB_ENV_LOCKING
%DB_IMMUTABLE_KEY %DB_MUTEX_SHARED %DB_HEAP
%DB_CHKSUM_SHA1 %DB_ENV_TXN_SNAPSHOT
- %DB_VERSION_MAJOR %DB_ENV_HOTBACKUP
+ %DB_VERSION_MAJOR %DB_ENV_HOTBACKUP %transform_mbio
%DB_TEST_POSTDESTROY %DB_FORCESYNC %DB_DUP
%DB_NOSERVER_HOME %DB_SEQ_INC %DB_FIXEDLEN
%DB_LOG_VERIFY_CAF %DB_TXN_TOKEN_SIZE
@@ -815,7 +815,7 @@ BEGIN { ## Begin Net::FullAuto Settings
$fa_code->[0]||='';
my $argv=join " ",@ARGV;
if ($argv!~/--edi*t*\s*|-e[a-z]|--admin|-V|-v|--VE*R*S*I*O*N*|
- --users|--ve*r*s*i*o*n*|--cat|--tutorial/xm) {
+ --users|--ve*r*s*i*o*n*|--cat|--tutorial|--figlet/xm) {
if ($fa_code->[0]) {
if ($Term::Menus::canload->($fa_code->[0])) {
require $fa_code->[0];
@@ -1285,7 +1285,11 @@ sub banner
my $Conveyed=$_[1]||{};
my $SaveMMap=$_[2]||'';
my $picks_from_parent=$_[3]||'';
- my $log_handle=$_[4]||'';
+ my $numbor=$_[4]||'';
+ my $ikey=$_[5]||'';
+ my $input=$_[6]||{};
+ my $MenuUnit_hash_ref=$_[7]||{};
+ my $log_handle=$_[8]||'';
$banner||='';
if (ref $banner eq 'CODE') {
my $banner_code=$banner;
@@ -1355,7 +1359,10 @@ sub banner
eval "\@banner=$banner";
}
$banner=join '',@banner;
- } return $banner;
+ }
+ return transform_mbio(transform_mbii($banner,$numbor,$ikey,$input,
+ $MenuUnit_hash_ref,$log_handle),$MenuUnit_hash_ref,
+ $Conveyed,$SaveMMap,$picks_from_parent,$log_handle);
}
@@ -1433,6 +1440,7 @@ sub Menu
#########################################
while (++$num) {
+ $start=$FullMenu->{$MenuUnit_hash_ref}[11]||0;
@convey=();
unless (exists $Items{$num}) {
if (exists $MenuUnit_hash_ref->{Banner}) {
@@ -1644,6 +1652,11 @@ sub Menu
$display_this_many_items=$_[0]->{Display}
if exists $_[0]->{Display};
+ if (exists $MenuUnit_hash_ref->{Scroll} &&
+ ref $MenuUnit_hash_ref->{Scroll} ne 'ARRAY') {
+ $MenuUnit_hash_ref->{Scroll}=
+ [ $MenuUnit_hash_ref->{Scroll},1 ];
+ }
############################################
# End MenuUnit Breakdown
@@ -1885,6 +1898,9 @@ sub test_hashref {
if (ref $hashref_to_test eq 'HASH') {
if (grep { /Item_/ } keys %{$hashref_to_test}) {
return 1;
+ } elsif (exists $hashref_to_test->{Input} &&
+ $hashref_to_test->{Input}) {
+ return 1;
} else {
my $die="\n FATAL ERROR! - Unable to verify Menu\n"
."\n This Error is usually the result of a Menu"
@@ -2026,6 +2042,210 @@ sub transform_sicm
}
+sub transform_mbio
+{
+
+ my $text=$_[0]||'';
+ my $input=$_[1]||{};
+ my $MenuUnit_hash_ref=$_[2]||{};
+ my $Conveyed=$_[3]||'';
+ my $SaveMMap=$_[4]||'';
+ my $picks_from_parent=$_[5]||'';
+ my $log_handle=$_[6]||'';
+ my $tobi_regex=qr/\](!)?o(?:u+tput[-_]*)*b*(?:a+nner[-_]*)
+ *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
+ my $test_regx_flag=0;
+ FE: foreach my $regx ($tobi_regex) {
+ last if $test_regx_flag;
+ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
+ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
+ my $esc_one=$1;my $bang=$2;
+ my $length_of_macro=length $esc_one;
+ $esc_one=~s/["]\s*[.]\s*["]//s;
+ $esc_one=~s/\]/\\\]/;$esc_one=~s/\[/\\\[/;
+ my $instructions=$esc_one;
+ $instructions=~s/^\\[]][^[]+\\[[]\s*[{](.*?)[}]$/$1/;
+ $instructions=~/^(.*?),(.*?)$/;
+ my $input_macro=$1;my $code=$2;
+ $code=~s/["']//g;
+ $code="\$main::$code";
+ my $input_text=$input->{$input_macro};
+ $code=eval $code;
+ my $cd=&Data::Dump::Streamer::Dump($code)->Out();
+ $cd=&transform_pmsi($cd,
+ $Conveyed,$SaveMMap,
+ $picks_from_parent);
+ $cd=~s/\$CODE\d*\s*=\s*//s;
+ $code=eval $cd;
+ my $output='';
+ $output=$code->($input_text) if $input_text!~/^\s*$/;
+ my $out_height=$output=~tr/\n//;
+ my @output=split /\n/,$output;
+ my @newtext=();
+ foreach my $line (split "\n",$text) {
+ if ($line=~/^(.*)$esc_one(.*)$/) {
+ my $front_of_line=$1;my $back_of_line=$2;
+ my $frlen=length $front_of_line;
+ my $bottomline=pop @output||'';
+ $bottomline=$front_of_line.$bottomline.$back_of_line;
+ foreach my $ln (@output) {
+ my $pad=sprintf "%-${frlen}s",'';
+ push @newtext,$pad.$ln;
+ }
+ push @newtext,$bottomline;
+ } else {
+ push @newtext,$line;
+ }
+ } $text=join "\n",@newtext;
+ }
+ }
+ return $text,$input;
+
+}
+
+sub transform_mbii
+{
+
+ my $text=$_[0]||'';
+ my $numbor=$_[1]||'';
+ my $ikey=$_[2]||'';
+ my $input=$_[3]||{};
+ my $MenuUnit_hash_ref=$_[4]||{};
+ my $log_handle=$_[4]||'';
+ my $tbii_regex=qr/\](!)?i(?:n+put[-_]*)*b*(?:a+nner[-_]*)
+ *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
+ my $test_regx_flag=0;
+ if ($ikey eq 'TAB' && exists $input->{focus}) {
+ $input->{focus}->[0]=$input->{focus}->[2]->{$input->{focus}->[0]};
+ $ikey='';$numbor='';
+ }
+
+ FE: foreach my $regx ($tbii_regex) {
+ last if $test_regx_flag;
+ my $fill_focus=0;
+ $fill_focus=1 unless exists $input->{focus};
+ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
+ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
+ my $esc_one=$1;my $bang=$2;
+ my $length_of_macro=length $esc_one;
+ $esc_one=~s/["]\s*[.]\s*["]//s;
+ $esc_one=~s/\]/\\\]/;$esc_one=~s/\[/\\\[/;
+ my $instructions=$esc_one;
+ $instructions=~s/^\\[]][^[]+\\[[]\s*[{](.*?)[}]$/$1/;
+ $instructions='('.$instructions.')';
+ my @instructions=eval $instructions;
+ unless (exists $input->{$instructions[0]}) {
+ $input->{$instructions[0]}=$instructions[1];
+ $numbor='';
+ }
+ $input->{$instructions[0]}||='';
+ if ($fill_focus) {
+ unless (exists $input->{focus}) {
+ my $default_focus=$instructions[0];
+ if (exists $MenuUnit_hash_ref->{Focus} &&
+ $MenuUnit_hash_ref->{Focus}) {
+ $default_focus=$MenuUnit_hash_ref->{Focus};
+ }
+ $input->{focus}=[$default_focus,[$instructions[0]],{}];
+ } else {
+ $input->{focus}->[2]->{
+ $input->{focus}->[1][$#{$input->{focus}->[1]}]}
+ =$instructions[0];
+ push @{$input->{focus}->[1]},$instructions[0];
+ $input->{focus}->[2]->{$instructions[0]}=
+ $input->{focus}->[1]->[0];
+ }
+ }
+ my @newtext=();
+ foreach my $line (split "\n",$text) {
+ if ($line=~/^(.*)$esc_one(.*)$/) {
+ my $front_of_line=$1;my $back_of_line=$2;
+ my $box_top_bottom='';my @sides=('| ',' |');
+ if ($#instructions==2 and $instructions[2]>0) {
+ if ($input->{focus}->[0] eq $instructions[0]) {
+ for (1..$instructions[2]) {
+ $box_top_bottom.='=';
+ }
+ @sides=('[ ',' ]');
+ } else {
+ for (1..$instructions[2]) {
+ $box_top_bottom.='-';
+ }
+ }
+ }
+ if ($input->{focus}->[0] eq $instructions[0]) {
+ if ($ikey eq 'BACKSPACE') {
+ chop $input->{$instructions[0]};
+ } elsif ($ikey ne 'TAB' && $numbor) {
+ $input->{$instructions[0]}.=$numbor if $numbor;
+ } elsif ($ikey eq 'DELETE') {
+ $input->{$instructions[0]}='';
+ }
+ }
+ my $insert=$sides[0];
+ $insert.=$input->{$instructions[0]};
+ my $insert_num_of_spaces=$instructions[2]-2;
+ $insert=sprintf "%-${insert_num_of_spaces}s",$insert;
+ $insert.=$sides[1];
+ my $frlen=length $front_of_line;
+ my $box_top_line='';
+ my $box_mid_line='';
+ my $box_bot_line='';
+ my $length_of_front_and_macro=$frlen+$length_of_macro;
+ if ($#newtext==-1 || $#newtext==0) {
+ $box_top_line=sprintf "%-${frlen}s",'';
+ $box_top_line.=$box_top_bottom;
+ } else {
+ my $front_of_box_top=unpack("a$frlen",$newtext[$#newtext-1]);
+ $front_of_box_top=sprintf "%-${frlen}s",$front_of_box_top
+ if length $front_of_box_top<$frlen;
+ my $back_of_box_top='';
+ if ($length_of_front_and_macro<=length
+ $newtext[$#newtext-1]) {
+ $back_of_box_top=unpack("x$length_of_front_and_macro a*",
+ $newtext[$#newtext-1]);
+ }
+ $box_top_line=$front_of_box_top.
+ $box_top_bottom.$back_of_box_top;
+ }
+ if ($#newtext==-1) {
+ $box_mid_line=sprintf "%-${frlen}s",'';
+ $box_mid_line.=$insert;
+ } else {
+ my $elem=($#newtext==0)?0:$#newtext;
+ my $front_of_box_mid=sprintf "%-${frlen}s",'';
+ if ($newtext[$elem]!~/^\s*$/) {
+ $front_of_box_mid=unpack("a$frlen",$newtext[$elem]);
+ $front_of_box_mid=sprintf "%-${frlen}s",$front_of_box_mid
+ if length $front_of_box_mid<$frlen;
+ }
+ my $back_of_box_mid='';
+ if ($length_of_front_and_macro<=length $newtext[$elem]) {
+ $back_of_box_mid=unpack("x$length_of_front_and_macro a*",
+ $newtext[$elem]);
+ }
+ $box_mid_line=$front_of_box_mid.
+ $insert.$back_of_box_mid;
+ }
+ $box_bot_line=$front_of_line.$box_top_bottom.$back_of_line;
+ if ($#newtext==-1) {
+ push @newtext,$box_top_line;
+ push @newtext,$box_mid_line;
+ } elsif ($#newtext==0) {
+ unshift @newtext,$box_top_line;
+ $newtext[1]=$box_mid_line;
+ } else {
+ $newtext[$#newtext-1]=$box_top_line;
+ $newtext[$#newtext]=$box_mid_line;
+ } push @newtext, $box_bot_line;
+ } else {
+ push @newtext,$line;
+ }
+ } $text=join "\n",@newtext;
+ }
+ } return $text, $input;
+}
+
sub transform_pmsi
{
@@ -2439,7 +2659,8 @@ sub pick # USAGE: &pick( ref_to_choices_array,
|| ($test_item=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/
&& grep { $1 eq $_ } list_module(
'main',$Term::Menus::fa_code))
- || ref $test_item eq 'CODE') {
+ || ref $test_item eq 'CODE' ||
+ &test_hashref($test_item)) {
my $con_regex=qr/\]c(o+nvey)*\[/i;
my $tpmi_regex=qr/\](!)?t(?:e+st[-_]*)*p*(?:r+vious[-_]*)
*m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
@@ -2548,7 +2769,7 @@ sub pick # USAGE: &pick( ref_to_choices_array,
$Persists,$Selected,$convey,$parent_menu;
};
- my $filtered_menu=0;my $defaults_exist=0;
+ my $filtered_menu=0;my $defaults_exist=0;my $input='';
while (1) {
if ($num_pick-$start<=$display_this_many_items) {
$choose_num=$num_pick-$start;
@@ -2589,11 +2810,12 @@ sub pick # USAGE: &pick( ref_to_choices_array,
}
while ($numbor=~/\d+/ &&
($numbor<=$start || $start+$choose_num < $numbor ||
- $numbor eq 'admin')) {
+ $numbor eq 'admin') || $input) {
my $menu_text='';my $picknum_for_display='';
my $bout='';
- $bout=&banner($MenuUnit_hash_ref->{Banner}||$banner,
- $Conveyed,$SaveMMap,$picks_from_parent,$log_handle);
+ ($bout,$input)=&banner($MenuUnit_hash_ref->{Banner}||$banner,
+ $Conveyed,$SaveMMap,$picks_from_parent,
+ $numbor,$ikey,$input,$MenuUnit_hash_ref,$log_handle);
$menu_text.=$bout."\n\n";
my $picknum=$start+1;
my $numlist=$choose_num;
@@ -2955,8 +3177,23 @@ sub pick # USAGE: &pick( ref_to_choices_array,
}
$pn{$picknum_for_display}=
[ $all_menu_items_array[$picknum-1],$picknum ];
- $menu_text.=" $mark $picknum_for_display. "
- ."\t$all_menu_items_array[$picknum-1]\n";
+ my $scroll=' ';
+ if (exists $MenuUnit_hash_ref->{Scroll}
+ && ($MenuUnit_hash_ref->{Scroll}->[1] eq $picknum
+ || $MenuUnit_hash_ref->{Scroll}->[0] eq $picknum)) {
+ if ($MenuUnit_hash_ref->{Scroll}->[0]) {
+ if ($MenuUnit_hash_ref->{Scroll}->[0] eq $picknum) {
+ $MenuUnit_hash_ref->{Scroll}->[1]=$picknum;
+ $MenuUnit_hash_ref->{Scroll}->[0]=0;
+ $scroll='>';
+ }
+ } else {
+ $scroll='>';
+ }
+ }
+ my $picknum_display=sprintf "%-7s",$picknum_for_display;
+ $menu_text.=" $scroll$mark $picknum_display"
+ ."$all_menu_items_array[$picknum-1]\n";
if (exists $FullMenu->{$MenuUnit_hash_ref}[6]
{$all_menu_items_array[$picknum-1]}) {
my $tstt=$FullMenu->{$MenuUnit_hash_ref}[6]
@@ -3033,12 +3270,12 @@ sub pick # USAGE: &pick( ref_to_choices_array,
if ($select_many || (keys %{${$MenuUnit_hash_ref}{Select}})) {
print "\n";
unless (keys %{$FullMenu->{$MenuUnit_hash_ref}[1]}) {
- print " a. Select All.";$ch=1;
+ print " a. Select All";$ch=1;
}
if ($mark_flg==1 || $Persists->{$MenuUnit_hash_ref}{defaults}) {
- print " c. Clear All.";print "\n" if $ch;
+ print " c. Clear All";#print "\n" if $ch;
}
- print " f. Finish.\n";
+ print " f. FINISH\n";
if ($filtered_menu) {
print "\n (Type '<' to return to previous Menu)\n";
}
@@ -3049,9 +3286,9 @@ sub pick # USAGE: &pick( ref_to_choices_array,
}
} else {
if ($Persists->{$MenuUnit_hash_ref}{defaults}) {
- print "\n";
- print " c. Clear Default Selection.\n";
- print " f. Finish with Default Selection.\n";
+ print "\n",
+ " c. Clear Default Selection.",
+ " f. FINISH with Default Selection.\n";
if ($filtered_menu) {
print "\n (Type '<' to return to previous Menu)\n";
} else {
@@ -3063,55 +3300,40 @@ sub pick # USAGE: &pick( ref_to_choices_array,
}
}
if ($display_this_many_items<$num_pick) {
- print "\n $num_pick Total Choices\n",
- "\n Press ENTER \(or 'd'\) to scroll downward\n",
- "\n OR 'u' to scroll upward ";
- if ($Term::Menus::fullauto) {
- if (exists $Net::FullAuto::FA_Core::admin_menus{
- &pw($MenuUnit_hash_ref)}) {
- print "\(Type 'quit' to Quit Admin Menu\)\n";
- } else {
- print "\(Type 'quit' to Quit FullAuto\)\n";
- }
- } else {
- print "\n \(Type 'quit' to Quit\)\n";
- }
- } elsif ($Term::Menus::fullauto) {
- if (exists $Net::FullAuto::FA_Core::admin_menus{
- &pw($MenuUnit_hash_ref)}) {
- print "\n \(Type 'quit' to Quit Admin Menu\)\n";
- } else {
- print "\n \(Type 'quit' to Quit FullAuto\)\n";
+ my $len=length $num_pick;my $pad='';
+ foreach my $n (1..$len) {
+ $pad.=' ';
}
- } else { print"\n \(Type 'quit' to Quit\)\n" }
- if ($Term::Menus::fullauto) {
- if (exists $Net::FullAuto::FA_Core::admin_menus{
- &pw($MenuUnit_hash_ref)}) {
- if ($MenuUnit_hash_ref->{Name} eq 'admin') {
- print "\n (Type 'help' for Help)\n";
- } else {
- print "\n (Type 'help' for Help)".
- " (Type 'admin' to return to Admin Menu)\n";
- }
- } else {
- print "\n (Type 'help' for Help)".
- " (Type 'admin' for Admin Menu)\n";
- }
- }
+ print "$pad ___",
+ "\n $num_pick Total Choices ",
+ "|_v_| Scroll with ARROW keys ".
+ " [F1] for HELP\n";
+ } else { print"\n \(Press [F1] for HELP\)\n" }
if ($Term::Menus::term_input) {
print "\n";
- if ($show_banner_only) {
- ($numbor,$ikey)=rawInput(
+ if (exists $MenuUnit_hash_ref->{Input} &&
+ $MenuUnit_hash_ref->{Input}) {
+ ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
+ " Press ENTER when finished ",1);
+ next unless $ikey eq 'ENTER' || $ikey eq 'ESC' ||
+ $ikey eq 'UPARROW' || $ikey eq 'DOWNARROW' ||
+ $ikey eq 'LEFTARROW' || $ikey eq 'RIGHTARROW' ||
+ $ikey eq 'F1';
+ } elsif ($show_banner_only) {
+ ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
" Press ENTER to continue ... ");
} else {
- ($numbor,$ikey)=rawInput(" PLEASE ENTER A CHOICE: ");
- }
+ ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
+ " PLEASE ENTER A CHOICE: ");
+ }
print "\n";
} else {
if ($show_banner_only) {
- print"\n Press ENTER to continue ... ";
+ print "\n \([ESC] to Quit\)",
+ " Press ENTER to continue ... ";
} else {
- print"\n PLEASE ENTER A CHOICE: ";
+ print "\n \([ESC] to Quit\)",
+ " PLEASE ENTER A CHOICE: ";
}
$numbor=<STDIN>;
} $picknum_for_display=$numbor;chomp $picknum_for_display;
@@ -3180,13 +3402,15 @@ sub pick # USAGE: &pick( ref_to_choices_array,
" selections, BUT -> You have not actually\n",
" selected anything!\n\n Do you wish ",
"to quit or re-attempt selecting?\n\n ",
- "Type 'quit' to quit or ENTER to continue ... ";
+ "Press [ESC] to quit or ENTER to continue ... ";
if ($Term::Menus::term_input) {
print "\n";
- ($choice,$ikey)=rawInput(" PLEASE ENTER A CHOICE: ");
+ ($choice,$ikey)=rawInput(" \([ESC] to Quit\)".
+ " PLEASE ENTER A CHOICE: ");
print "\n";
} else {
- print"\n PLEASE ENTER A CHOICE: ";
+ print " \([ESC] to Quit\)",
+ "\n PLEASE ENTER A CHOICE: ";
$choice=<STDIN>;
}
chomp($choice);
@@ -4185,6 +4409,11 @@ sub pick # USAGE: &pick( ref_to_choices_array,
$SavePick->{$parent_menu}->{$key}='-' if
$sp_copy{$key} eq '+';
}
+ $parent_menu->{Scroll}->[1]||=0;
+ if ($parent_menu->{Scroll}->[1]>1) {
+ $FullMenu->{$parent_menu}[11]=
+ --$parent_menu->{Scroll}->[1];
+ }
return '-',
$FullMenu,$Selected,$Conveyed,
$SavePick,$SaveMMap,$SaveNext,
@@ -4481,10 +4710,14 @@ return 'DONE_SUB';
} elsif ($menu_output) {
return $menu_output;
}
- } elsif ($numbor=~/^quit$/i) {
+ } elsif ($ikey eq 'ESC' || $numbor=~/^quit|exit|bye$/i) {
+ print "\n" if $^O ne 'cygwin';
return ']quit['
- } elsif ($Term::Menus::fullauto and $numbor=~/^help$/i) {
+ } elsif ($Term::Menus::fullauto and $ikey eq 'F1' ||
+ $numbor=~/^help$/i) {
system('man Net::FullAuto');
+ } elsif ($ikey eq 'F1' || $numbor=~/^help$/i) {
+ system('man Term::Menus');
} elsif ($Term::Menus::fullauto and $numbor=~/^admin$/i) {
if (!exists $Net::FullAuto::FA_Core::admin_menus{
&pw($MenuUnit_hash_ref)}) {
@@ -4544,34 +4777,140 @@ return 'DONE_SUB';
$Persists->{$parent_menu}{defaults}=0 if defined $parent_menu;
}
if ($numbor=~/^u$/i || $ikey eq 'UPARROW' || $ikey eq 'PAGEUP') {
- if (0<=$start-$display_this_many_items) {
+ if ($ikey ne 'PAGEUP' && exists $MenuUnit_hash_ref->{Scroll}
+ && $MenuUnit_hash_ref->{Scroll}) {
+ $MenuUnit_hash_ref->{Scroll}->[1]-- unless
+ $MenuUnit_hash_ref->{Scroll}->[1]==1;
+ my $remainder=0;my $curscreennum=0;
+ $remainder=$num_pick % $choose_num if $num_pick;
+ if ($start==$MenuUnit_hash_ref->{Scroll}->[1]) {
+ if ($display_this_many_items<$num_pick-$start
+ || $remainder || (!$remainder &&
+ $num_pick==$start+1)) {
+ $start=$start-$display_this_many_items;
+ $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
+ }
+ } else { next }
+ $numbor=$start+$choose_num+1;
+ $hidedefaults=0;
+ last;
+ } elsif (0<=$start-$display_this_many_items) {
$start=$start-$display_this_many_items;
+ $MenuUnit_hash_ref->{Scroll}->[1]=
+ $start+$display_this_many_items
+ if $ikey eq 'PAGEUP' &&
+ exists $MenuUnit_hash_ref->{Scroll}
+ && $MenuUnit_hash_ref->{Scroll};
$FullMenu->{$MenuUnit_hash_ref}[11]=$start;
} else {
$start=$FullMenu->{$MenuUnit_hash_ref}[11]=0;
}
$numbor=$start+$choose_num+1;
+ $hidedefaults=0;
+ last;
+ } elsif ($ikey eq 'END') {
+ $FullMenu->{$MenuUnit_hash_ref}[11]=$num_pick;
+ $MenuUnit_hash_ref->{Scroll}->[1]=$num_pick if
+ $MenuUnit_hash_ref->{Scroll} &&
+ $MenuUnit_hash_ref->{Scroll};
+ $hidedefaults=0;
+ if ($num_pick==$start+$choose_num) {
+ next;
+ }
+ my $remainder=$num_pick % $choose_num;
+ $start=$num_pick-$remainder;
last;
+ } elsif ($ikey eq 'HOME') {
+ $FullMenu->{$MenuUnit_hash_ref}[11]=0;
+ $MenuUnit_hash_ref->{Scroll}->[1]=1 if
+ $MenuUnit_hash_ref->{Scroll} &&
+ $MenuUnit_hash_ref->{Scroll};
+ $hidedefaults=0;
+ $start=0;
+ last;
+ } elsif ($numbor && unpack('a1',$numbor) eq '!') {
+ # SHELLOUT shellout
+ my $username=getlogin || getpwuid($<);
+ my $cmd=unpack('x1 a*',$numbor);
+ print "\n";
+ unless ($^O eq 'cygwin') {
+ system("su -l -c$cmd $username");
+ } else {
+ system($cmd);
+ }
+ print "\nPress ENTER to continue";<STDIN>;
+ next;
} elsif (((!$ikey || $ikey eq 'ENTER') &&
($numbor=~/^()$/ || $numbor=~/^\n/)) || $numbor=~/^d$/i
|| $ikey eq 'DOWNARROW' || $ikey eq 'PAGEDOWN') {
- if ($show_banner_only) {
- if (exists $MenuUnit_hash_ref->{Result}) {
- $numbor='f';
- $picks{'__FA_Banner__'}='';
- } else {
- return 'DONE_SUB';
- }
- } elsif ($display_this_many_items<$num_pick-$start) {
- $start=$start+$display_this_many_items;
- $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
- } else {
- $start=$FullMenu->{$MenuUnit_hash_ref}[11]=0;
- }
- unless ($show_banner_only) {
+ if (($ikey eq 'DOWNARROW' || $numbor=~/^d$/i) &&
+ exists $MenuUnit_hash_ref->{Scroll}
+ && $MenuUnit_hash_ref->{Scroll}) {
+ my $remainder=0;my $curscreennum=0;
+ $remainder=$num_pick % $choose_num if $num_pick;
+ $curscreennum=($start+$remainder==$num_pick)?
+ $start+$remainder:$start+$choose_num;
+ my $s_num=$MenuUnit_hash_ref->{Scroll}->[1];
+ $MenuUnit_hash_ref->{Scroll}->[1]++
+ if $MenuUnit_hash_ref->{Scroll}->[1]!=$num_pick;
+ if ($curscreennum<$MenuUnit_hash_ref->{Scroll}->[1]) {
+ if ($display_this_many_items<$num_pick-$start) {
+ $start=$start+$display_this_many_items;
+ $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
+ } else {
+ $start=$start+$remainder;
+ $FullMenu->{$MenuUnit_hash_ref}[11]=$num_pick;
+ }
+ } else { next }
$hidedefaults=0;
$numbor=$start+$choose_num+1;
last;
+ } elsif ($ikey eq 'ENTER' && exists $MenuUnit_hash_ref->{Scroll}
+ && $MenuUnit_hash_ref->{Scroll} && !$show_banner_only) {
+ $numbor=$MenuUnit_hash_ref->{Scroll}->[1];
+ $MenuUnit_hash_ref->{Scroll}->[1]++;
+ } else {
+ if ($show_banner_only) {
+ if (exists $MenuUnit_hash_ref->{Result}) {
+ $numbor='f';
+ $picks{'__FA_Banner__'}='';
+ my $remainder=0;
+ $remainder=$choose_num % $num_pick if $num_pick;
+ my $curscreennum=($start+$remainder==$num_pick)?
+ $start+$remainder:$start+$choose_num;
+ my $numpick=0;
+ if ($parent_menu and exists $parent_menu->{Scroll}) {
+ if (ref $parent_menu->{Scroll} eq 'ARRAY') {
+ $numpick=$#{[keys %{$FullMenu->{$parent_menu}[2]}]};
+ if ($curscreennum<$parent_menu->{Scroll}->[1] &&
+ $parent_menu->{Scroll}->[1]<$numpick) {
+ $FullMenu->{$parent_menu}[11]=
+ $parent_menu->{Scroll}->[1];
+ }
+ }
+ $parent_menu->{Scroll}->[1]||=0;
+ if ($parent_menu->{Scroll}->[1]-1==$numpick) {
+ $FullMenu->{$parent_menu}[11]=
+ --$parent_menu->{Scroll}->[1];
+ }
+ }
+ } else {
+ return 'DONE_SUB';
+ }
+ } elsif ($display_this_many_items<$num_pick-$start) {
+ $start=$start+$display_this_many_items;
+ $MenuUnit_hash_ref->{Scroll}->[1]=$start+1 if
+ exists $MenuUnit_hash_ref->{Scroll}
+ && $MenuUnit_hash_ref->{Scroll};
+ $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
+ } elsif ($ikey ne 'PAGEDOWN') {
+ $start=$FullMenu->{$MenuUnit_hash_ref}[11]=0;
+ }
+ unless ($show_banner_only || $numbor!~/^\d+/) {
+ $hidedefaults=0;
+ $numbor=$start+$choose_num+1;
+ last;
+ }
}
} chomp $numbor;
if (!((keys %picks) && $numbor=~/^[Ff]$/) &&
@@ -4759,7 +5098,7 @@ return 'DONE_SUB';
{$all_menu_items_array[$numbor-1]};
}
}
- chomp($numbor);
+ chomp($numbor) if $numbor;
unless ($numbor_is_eff) {
if (exists $picks{$numbor}) {
$FullMenu->{$cur_menu}[5]='ERASE';
@@ -4822,7 +5161,7 @@ return 'DONE_SUB';
push @{$Conveyed->{&pw($cur_menu)}},
$all_menu_items_array[$key-1];
}
- } else {
+ } elsif ($numbor) {
$Conveyed->{&pw($cur_menu)}=
$all_menu_items_array[$numbor-1];
}
@@ -5786,6 +6125,10 @@ return 'DONE_SUB';
delete $FullMenu->{$MenuUnit_hash_ref}[2]
{'__FA_Banner__'};
%picks=();
+ $start=$FullMenu->{$MenuUnit_hash_ref}[11]-1 if
+ $start+$choose_num<$FullMenu->{$MenuUnit_hash_ref}[11];
+ $choose_num=$num_pick-$start if
+ $display_this_many_items>=$num_pick-$start;
next;
} elsif ($menu_output) {
return $menu_output;
@@ -6227,13 +6570,13 @@ The user sees ==>
Please Pick an Item:
- 1. First Item
- 2. Second Item
- 3. Third Item
+ 1 First Item
+ 2 Second Item
+ 3 Third Item
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 2 >-<ENTER>----------------------------------
@@ -6256,47 +6599,43 @@ The user sees ==>
Please Pick an Item:
- 1. arch
- 2. ash
- 3. awk
- 4. basename
- 5. bash
- 6. cat
- 7. chgrp
- 8. chmod
- 9. chown
- 10. cp
+ 1 arch
+ 2 ash
+ 3 awk
+ 4 basename
+ 5 bash
+ 6 cat
+ 7 chgrp
+ 8 chmod
+ 9 chown
+ 10 cp
- 93 Total Choices
+ a. Select All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--<ENTER>--------------------------------------
Please Pick an Item:
- 11. cpio
- 12. csh
- 13. cut
- 14. date
- 15. dd
- 16. df
- 17. echo
- 18. ed
- 19. egrep
- 20. env
-
- 93 Total Choices
+ 11 cpio
+ 12 csh
+ 13 cut
+ 14 date
+ 15 dd
+ 16 df
+ 17 echo
+ 18 ed
+ 19 egrep
+ 20 env
- Press ENTER (or "d") to scroll downward
+ a. Select All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 14 >-<ENTER>----------------------------------
@@ -6330,27 +6669,22 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 3 >-<ENTER>----------------------------------
@@ -6360,27 +6694,22 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- * 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- * 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ * 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ * 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< f >-<ENTER>----------------------------------
@@ -6442,27 +6771,22 @@ The user sees ==>
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -6494,10 +6818,7 @@ The user sees ==>
This is a BANNER ONLY display.
-
- (Type 'quit' to Quit)
-
- Press ENTER to continue ...
+ ([ESC] to Quit) Press ENTER to continue ...
=item *
@@ -6562,38 +6883,33 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer for bash :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -6680,38 +6996,33 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer for bash :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -7087,27 +7398,22 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- * 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- * 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ * 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ * 9 /bin Utility - chown
+ 10 /bin Utility - cp
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
=back
@@ -7132,26 +7438,22 @@ B<NOTE:> See the B<RECURSIVELY CALLED MENUS> section for more information.
The user sees ==>
- d 1. bin
- d 2. blib
- d 3. dist
- d 4. inc
- d 5. lib
- d 6. Module
- d 7. t
- 8. briangreat2.txt
- * 9. ChangeLog
- 10. close.perl
+ d 1 bin
+ d 2 blib
+ d 3 dist
+ d 4 inc
+ d 5 lib
+ d 6 Module
+ d 7 t
+ 8 briangreat2.txt
+ * 9 ChangeLog
+ 10 close.perl
- a. Select All. f. Finish.
+ a. Select All f. FINISH
+ ___
+ 49 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 49 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
=back
@@ -7295,27 +7597,22 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- 93 Total Choices
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
B<NOTE:> C<]C[> can be used as a shorthand for C<]Convey[>.
@@ -7373,38 +7670,33 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- Press ENTER (or "d") to scroll downward
+ a. Select All c. Clear All f. FINISH
- OR "u" to scroll upward (Type "quit" to quit)
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
@@ -7484,40 +7776,40 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
Is bash Good or Bad? :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 1 >-<ENTER>----------------------------------
Who commented on bash? :
- 1. Bob said bash is a Good Utility!
- 2. Mary said bash is a Good Utility!
+ 1 Bob said bash is a Good Utility!
+ 2 Mary said bash is a Good Utility!
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 2 >-<ENTER>----------------------------------
@@ -8015,16 +8307,11 @@ The user sees ==>
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< 5 >-<ENTER>----------------------------------
@@ -8032,12 +8319,12 @@ The user sees ==>
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
In the above example, suppose that the user "fat-fingered" his/her
@@ -8056,12 +8343,12 @@ The user sees ==>
Choose an Answer :
- 1. bash is a Good Utility
- 2. bash is a Bad Utility
+ 1 bash is a Good Utility
+ 2 bash is a Bad Utility
- (Type "quit" to quit)
+ (Press [F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< > >-<ENTER>-----------------------------
@@ -8069,27 +8356,22 @@ The user sees ==>
Choose a /bin Utility :
- 1. /bin Utility - arch
- 2. /bin Utility - ash
- 3. /bin Utility - awk
- 4. /bin Utility - basename
- - 5. /bin Utility - bash
- 6. /bin Utility - cat
- 7. /bin Utility - chgrp
- 8. /bin Utility - chmod
- 9. /bin Utility - chown
- 10. /bin Utility - cp
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
+ 1 /bin Utility - arch
+ 2 /bin Utility - ash
+ 3 /bin Utility - awk
+ 4 /bin Utility - basename
+ - 5 /bin Utility - bash
+ 6 /bin Utility - cat
+ 7 /bin Utility - chgrp
+ 8 /bin Utility - chmod
+ 9 /bin Utility - chown
+ 10 /bin Utility - cp
- OR "u" to scroll upward (Type "quit" to quit)
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
Note in the above example the Dash ' B<-> ' in front of item B<5.> This informs
the user that s/he had previously selected this item. To clear the selection,
@@ -8118,16 +8400,11 @@ made in the child menu.
9. /bin Utility - chown
10. /bin Utility - cp
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
+ ___
+ 93 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 93 Total Choices
-
- Press ENTER (or "d") to scroll downward
-
- OR "u" to scroll upward (Type "quit" to quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
=back
@@ -8148,28 +8425,22 @@ The user sees ==>
Choose a /bin Utility :
- * 1. [.exe
- * 2. 2to3
- 3. 2to3-3.2
- * 4. 411toppm.exe
- 5. a2p.exe
- 6. aaflip.exe
- 7. aclocal
- * 8. aclocal-1.10
- 9. aclocal-1.11
- * 10. aclocal-1.12
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 1925 Total Choices
+ * 1 [.exe
+ * 2 2to3
+ 3 2to3-3.2
+ * 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ * 8 aclocal-1.10
+ 9 aclocal-1.11
+ * 10 aclocal-1.12
- Press ENTER (or 'd') to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< % >-<ENTER>----------------------------------
@@ -8188,19 +8459,13 @@ The user sees ==>
1808. Xdmx.exe
1815. Xephyr.exe
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 1925 Total Choices
-
- Press ENTER (or 'd') to scroll downward
-
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
And if we choose to enter ' B<%> ' I<again>
@@ -8210,30 +8475,24 @@ The user sees ==>
Choose a /bin Utility :
- 1925. znew
- 1924. zmore
- 1923. zless
- 1922. zipsplit.exe
- 1921. zipnote.exe
- 1920. zipinfo.exe
- 1919. zipgrep
- 1918. zipcloak.exe
- 1917. zip.exe
- 1916. zgrep
+ 1925 znew
+ 1924 zmore
+ 1923 zless
+ 1922 zipsplit.exe
+ 1921 zipnote.exe
+ 1920 zipinfo.exe
+ 1919 zipgrep
+ 1918 zipcloak.exe
+ 1917 zip.exe
+ 1916 zgrep
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- 1925 Total Choices
-
- Press ENTER (or 'd') to scroll downward
-
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
This submenu of sorted selections works just like any other menu. The user can
deselect an item, clear all items, re-choose all items, etc. The choices made
@@ -8241,7 +8500,7 @@ here are preserved when the user navigates back to the original (parent)
menu. In other words, if Item 1. is deselected in the sorted menu, Item 1.
will also be deselected in the parent menu. Navigating back to the
parent is necessary - the menu will not generate results from a sort menu.
-Use either the B<LEFTARROW> ' B<E<lt>> ' key or Finish key ' B<F> or B<f> ' to
+Use either the B<LEFTARROW> ' B<E<lt>> ' key or FINISH key ' B<F> or B<f> ' to
return to the parent menu, and then continue your menu activities there.
=back
@@ -8264,28 +8523,22 @@ The user sees ==>
Choose a /bin Utility :
- * 1. [.exe
- 2. 2to3
- * 3. 2to3-3.2
- 4. 411toppm.exe
- 5. a2p.exe
- 6. aaflip.exe
- 7. aclocal
- 8. aclocal-1.10
- * 9. aclocal-1.11
- 10. aclocal-1.12
-
- a. Select All. c. Clear All.
- f. Finish.
-
- 1925 Total Choices
+ * 1 [.exe
+ 2 2to3
+ * 3 2to3-3.2
+ 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ 8 aclocal-1.10
+ * 9 aclocal-1.11
+ 10 aclocal-1.12
- Press ENTER (or 'd') to scroll downward
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
- OR 'u' to scroll upward
- (Type 'quit' to Quit)
-
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
--< * >-<ENTER>----------------------------------
@@ -8293,19 +8546,18 @@ The user sees ==>
Choose a /bin Utility :
- * 1. [.exe
- * 3. 2to3-3.2
- * 9. aclocal-1.11
- * 11. aclocal-1.13
+ * 1 [.exe
+ * 3 2to3-3.2
+ * 9 aclocal-1.11
+ * 11 aclocal-1.13
- a. Select All. c. Clear All.
- f. Finish.
+ a. Select All c. Clear All f. FINISH
(Type '<' to return to previous Menu)
- (Type 'quit' to Quit)
+ ([F1] for HELP)
- PLEASE ENTER A CHOICE:
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
This submenu of summary selections works just like any other menu. The user
can deselect an item, clear all items, re-choose all items, etc. The choices
@@ -8313,11 +8565,73 @@ made here are preserved when the user navigates back to the original (parent)
menu. In other words, if Item 1. is deselected in the summary menu, Item 1.
will also be deselected in the parent menu. Navigating back to the
parent is necessary - the menu will not generate results from a summary menu.
-Use either the B<LEFTARROW> ' B<E<lt>> ' key or Finish key ' B<F> or B<f> ' to
+Use either the B<LEFTARROW> ' B<E<lt>> ' key or FINISH key ' B<F> or B<f> ' to
return to the parent menu, and then continue your menu activities there.
=back
+=head3 Shell Out to Command Environment ' B<!>I<command> '
+
+=head1
+
+Borrowed from the editor vi, users can run any command environment command
+(typically a shell command) without leaving their Term::Menus session or even
+context. At anytime, a user can type an exclamation point ' B<!> ' followed
+by the command they wish to run, and that command will be run and the results
+returned for viewing.
+
+=over 4
+
+The user sees ==>
+
+ Choose a /bin Utility :
+
+ * 1 [.exe
+ 2 2to3
+ * 3 2to3-3.2
+ 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ 8 aclocal-1.10
+ * 9 aclocal-1.11
+ 10 aclocal-1.12
+
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
+
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
+
+--< !hostname >-<ENTER>----------------------------------
+
+The user sees ==>
+
+ Choose a /bin Utility :
+
+ * 1 [.exe
+ 2 2to3
+ * 3 2to3-3.2
+ 4 411toppm.exe
+ 5 a2p.exe
+ 6 aaflip.exe
+ 7 aclocal
+ 8 aclocal-1.10
+ * 9 aclocal-1.11
+ 10 aclocal-1.12
+
+ a. Select All c. Clear All f. FINISH
+ ___
+ 1925 Total Choices |_v_| Scroll with ARROW keys [F1] for HELP
+
+ ([ESC] to Quit) PLEASE ENTER A CHOICE:
+
+central_server
+
+Press ENTER to continue
+
+=back
+
=head1 AUTHOR
Brian M. Kelly <Brian.Kelly@fullautosoftware.net>