@@ -780,7 +780,7 @@ def cmd_jobs(*args)
780
780
# @param str [String] the string currently being typed before tab was hit
781
781
# @param words [Array<String>] the previously completed words on the command line. words is always
782
782
# at least 1 when tab completion has reached this stage since the command itself has been completed
783
-
783
+
784
784
def cmd_jobs_tabs ( str , words )
785
785
if words . length == 1
786
786
return @@jobs_opts . fmt . keys
@@ -810,7 +810,7 @@ def cmd_kill(*args)
810
810
# @param str [String] the string currently being typed before tab was hit
811
811
# @param words [Array<String>] the previously completed words on the command line. words is always
812
812
# at least 1 when tab completion has reached this stage since the command itself has been completed
813
-
813
+
814
814
def cmd_kill_tabs ( str , words )
815
815
return [ ] if words . length > 1
816
816
framework . jobs . keys
@@ -932,7 +932,7 @@ def cmd_threads(*args)
932
932
# @param str [String] the string currently being typed before tab was hit
933
933
# @param words [Array<String>] the previously completed words on the command line. words is always
934
934
# at least 1 when tab completion has reached this stage since the command itself has been completed
935
-
935
+
936
936
def cmd_threads_tabs ( str , words )
937
937
if words . length == 1
938
938
return @@threads_opts . fmt . keys
@@ -1012,7 +1012,7 @@ def cmd_load(*args)
1012
1012
# @param str [String] the string currently being typed before tab was hit
1013
1013
# @param words [Array<String>] the previously completed words on the command line. words is always
1014
1014
# at least 1 when tab completion has reached this stage since the command itself has been completed
1015
-
1015
+
1016
1016
def cmd_load_tabs ( str , words )
1017
1017
tabs = [ ]
1018
1018
@@ -1175,7 +1175,7 @@ def cmd_route(*args)
1175
1175
# @param str [String] the string currently being typed before tab was hit
1176
1176
# @param words [Array<String>] the previously completed words on the command line. words is always
1177
1177
# at least 1 when tab completion has reached this stage since the command itself has been completed
1178
-
1178
+
1179
1179
def cmd_route_tabs ( str , words )
1180
1180
if words . length == 1
1181
1181
return %w{ add remove get flush print }
@@ -1304,7 +1304,7 @@ def cmd_loadpath(*args)
1304
1304
# @param str [String] the string currently being typed before tab was hit
1305
1305
# @param words [Array<String>] the previously completed words on the command line. words is always
1306
1306
# at least 1 when tab completion has reached this stage since the command itself has been completed
1307
-
1307
+
1308
1308
def cmd_loadpath_tabs ( str , words )
1309
1309
return [ ] if words . length > 1
1310
1310
@@ -1429,7 +1429,7 @@ def search_modules_sql(match)
1429
1429
# @param str [String] the string currently being typed before tab was hit
1430
1430
# @param words [Array<String>] the previously completed words on the command line. words is always
1431
1431
# at least 1 when tab completion has reached this stage since the command itself has been completed
1432
-
1432
+
1433
1433
def cmd_search_tabs ( str , words )
1434
1434
if words . length == 1
1435
1435
return @@search_opts . fmt . keys
@@ -1748,7 +1748,7 @@ def cmd_sessions(*args)
1748
1748
# @param str [String] the string currently being typed before tab was hit
1749
1749
# @param words [Array<String>] the previously completed words on the command line. words is always
1750
1750
# at least 1 when tab completion has reached this stage since the command itself has been completed
1751
-
1751
+
1752
1752
def cmd_sessions_tabs ( str , words )
1753
1753
if words . length == 1
1754
1754
return @@sessions_opts . fmt . keys
@@ -1873,7 +1873,7 @@ def cmd_set(*args)
1873
1873
# @param str [String] the string currently being typed before tab was hit
1874
1874
# @param words [Array<String>] the previously completed words on the command line. words is always
1875
1875
# at least 1 when tab completion has reached this stage since the command itself has been completed
1876
-
1876
+
1877
1877
def cmd_set_tabs ( str , words )
1878
1878
1879
1879
# A value has already been specified
@@ -1958,7 +1958,7 @@ def cmd_setg(*args)
1958
1958
# @param str [String] the string currently being typed before tab was hit
1959
1959
# @param words [Array<String>] the previously completed words on the command line. words is always
1960
1960
# at least 1 when tab completion has reached this stage since the command itself has been completed
1961
-
1961
+
1962
1962
def cmd_setg_tabs ( str , words )
1963
1963
cmd_set_tabs ( str , words )
1964
1964
end
@@ -2058,7 +2058,7 @@ def cmd_show(*args)
2058
2058
# @param str [String] the string currently being typed before tab was hit
2059
2059
# @param words [Array<String>] the previously completed words on the command line. words is always
2060
2060
# at least 1 when tab completion has reached this stage since the command itself has been completed
2061
-
2061
+
2062
2062
def cmd_show_tabs ( str , words )
2063
2063
return [ ] if words . length > 1
2064
2064
@@ -2107,7 +2107,7 @@ def cmd_unload(*args)
2107
2107
# @param str [String] the string currently being typed before tab was hit
2108
2108
# @param words [Array<String>] the previously completed words on the command line. words is always
2109
2109
# at least 1 when tab completion has reached this stage since the command itself has been completed
2110
-
2110
+
2111
2111
def cmd_unload_tabs ( str , words )
2112
2112
return [ ] if words . length > 1
2113
2113
@@ -2184,7 +2184,7 @@ def cmd_unset(*args)
2184
2184
# @param str [String] the string currently being typed before tab was hit
2185
2185
# @param words [Array<String>] the previously completed words on the command line. words is always
2186
2186
# at least 1 when tab completion has reached this stage since the command itself has been completed
2187
-
2187
+
2188
2188
def cmd_unset_tabs ( str , words )
2189
2189
datastore = active_module ? active_module . datastore : self . framework . datastore
2190
2190
datastore . keys
@@ -2212,7 +2212,7 @@ def cmd_unsetg(*args)
2212
2212
# @param str [String] the string currently being typed before tab was hit
2213
2213
# @param words [Array<String>] the previously completed words on the command line. words is always
2214
2214
# at least 1 when tab completion has reached this stage since the command itself has been completed
2215
-
2215
+
2216
2216
def cmd_unsetg_tabs ( str , words )
2217
2217
self . framework . datastore . keys
2218
2218
end
@@ -2347,7 +2347,7 @@ def cmd_pushm(*args)
2347
2347
# @param str [String] the string currently being typed before tab was hit
2348
2348
# @param words [Array<String>] the previously completed words on the command line. words is always
2349
2349
# at least 1 when tab completion has reached this stage since the command itself has been completed
2350
-
2350
+
2351
2351
def cmd_pushm_tabs ( str , words )
2352
2352
tab_complete_module ( str , words )
2353
2353
end
@@ -2403,8 +2403,8 @@ def cmd_popm_help
2403
2403
#
2404
2404
# @param str [String] the string currently being typed before tab was hit
2405
2405
# @param words [Array<String>] the previously completed words on the command line. words is always
2406
- # at least 1 when tab completion has reached this stage since the command itself has been completed
2407
-
2406
+ # at least 1 when tab completion has reached this stage since the command itself has been completd
2407
+
2408
2408
def cmd_use_tabs ( str , words )
2409
2409
return [ ] if words . length > 1
2410
2410
@@ -2438,9 +2438,9 @@ def cmd_grep_help
2438
2438
# Greps the output of another console command, usage is similar the shell grep command
2439
2439
# grep [options] pattern other_cmd [other command's args], similar to the shell's grep [options] pattern file
2440
2440
# however it also includes -k to keep lines and -s to skip lines. grep -k 5 is useful for keeping table headers
2441
- #
2441
+ #
2442
2442
# @param args [Array<String>] Args to the grep command minimally including a pattern & a command to search
2443
- # @return [String,nil] Results matching the regular expression given
2443
+ # @return [String,nil] Results matching the regular expression given
2444
2444
2445
2445
def cmd_grep ( *args )
2446
2446
return cmd_grep_help if args . length < 2
@@ -2507,7 +2507,7 @@ def cmd_grep(*args)
2507
2507
def temp_output . write ( msg = '' )
2508
2508
self . print_raw ( msg )
2509
2509
end
2510
- orig_driver . init_ui ( orig_driver_input , temp_output )
2510
+ orig_driver . init_ui ( orig_driver_input , temp_output )
2511
2511
# run the desired command to be grepped
2512
2512
orig_driver . run_single ( cmd )
2513
2513
# restore original output
@@ -2534,19 +2534,19 @@ def temp_output.write(msg = '')
2534
2534
all_lines = cmd_output . lines . select { |line | line }
2535
2535
# control matching based on remaining match_mods (:insensitive was already handled)
2536
2536
if match_mods [ :invert ]
2537
- statement = 'not line =~ rx'
2537
+ statement = 'not line =~ rx'
2538
2538
else
2539
2539
statement = 'line =~ rx'
2540
2540
end
2541
-
2541
+
2542
2542
our_lines = [ ]
2543
2543
count = 0
2544
2544
all_lines . each_with_index do |line , line_num |
2545
2545
next if ( output_mods [ :skip ] and line_num < output_mods [ :skip ] )
2546
2546
our_lines << line if ( output_mods [ :keep ] and line_num < output_mods [ :keep ] )
2547
2547
# we don't wan't to keep processing if we have a :max and we've reached it already (not counting skips/keeps)
2548
2548
break if match_mods [ :max ] and count >= match_mods [ :max ]
2549
- if eval statement
2549
+ if eval statement
2550
2550
count += 1
2551
2551
# we might get a -A/after and a -B/before at the same time
2552
2552
our_lines += retrieve_grep_lines ( all_lines , line_num , output_mods [ :before ] , output_mods [ :after ] )
@@ -2564,13 +2564,13 @@ def temp_output.write(msg = '')
2564
2564
# @param str [String] the string currently being typed before tab was hit
2565
2565
# @param words [Array<String>] the previously completed words on the command line. words is always
2566
2566
# at least 1 when tab completion has reached this stage since the command itself has been completed
2567
-
2567
+
2568
2568
def cmd_grep_tabs ( str , words )
2569
2569
tabs = @@grep_opts . fmt . keys || [ ] # default to use grep's options
2570
2570
# if not an opt, use normal tab comp.
2571
2571
# @todo uncomment out next line when tab_completion normalization is complete RM7649 or
2572
2572
# replace with new code that permits "nested" tab completion
2573
- # tabs = driver.get_all_commands if (str and str =~ /\w/)
2573
+ # tabs = driver.get_all_commands if (str and str =~ /\w/)
2574
2574
tabs
2575
2575
end
2576
2576
0 commit comments