mysh 0.6.12 → 0.6.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -3
  3. data/lib/mysh.rb +11 -3
  4. data/lib/mysh/{internal/action.rb → action.rb} +8 -8
  5. data/lib/mysh/{internal/action_pool.rb → action_pool.rb} +8 -8
  6. data/lib/mysh/{internal/actions/command_line.rb → command_line.rb} +10 -10
  7. data/lib/mysh/{internal/actions/command_line → command_line}/debug.rb +9 -11
  8. data/lib/mysh/{internal/actions/command_line → command_line}/history.rb +0 -0
  9. data/lib/mysh/{internal/actions/command_line → command_line}/init.rb +8 -8
  10. data/lib/mysh/{internal/actions/command_line → command_line}/load.rb +5 -5
  11. data/lib/mysh/{internal/actions/command_line → command_line}/pause.rb +6 -8
  12. data/lib/mysh/{internal/actions/command_line → command_line}/post_prompt.rb +10 -12
  13. data/lib/mysh/{internal/actions/command_line → command_line}/pre_prompt.rb +10 -12
  14. data/lib/mysh/{internal/actions/command_line → command_line}/prompt.rb +9 -10
  15. data/lib/mysh/command_line/quit.rb +19 -0
  16. data/lib/mysh/{internal/actions/command_line → command_line}/usage.rb +4 -4
  17. data/lib/mysh/external.rb +3 -4
  18. data/lib/mysh/globalize.rb +5 -14
  19. data/lib/mysh/handlebars.rb +1 -3
  20. data/lib/mysh/handlebars/{string.rb → eval_handlebars.rb} +5 -3
  21. data/lib/mysh/{internal/actions/help → help}/env.txt +0 -0
  22. data/lib/mysh/{internal/actions/help → help}/expr.txt +0 -0
  23. data/lib/mysh/{internal/actions/help → help}/gem.txt +0 -0
  24. data/lib/mysh/{internal/actions/help → help}/gls.txt +0 -0
  25. data/lib/mysh/{internal/actions/help → help}/h_o_h.txt +1 -1
  26. data/lib/mysh/{internal/actions/help → help}/hbar.txt +0 -0
  27. data/lib/mysh/{internal/actions/help → help}/help.txt +0 -0
  28. data/lib/mysh/{internal/actions/help → help}/history.txt +0 -0
  29. data/lib/mysh/{internal/actions/help → help}/init.txt +0 -0
  30. data/lib/mysh/{internal/actions/help → help}/kbd.txt +0 -0
  31. data/lib/mysh/{internal/actions/help → help}/math.txt +0 -0
  32. data/lib/mysh/{internal/actions/help → help}/mls.txt +0 -0
  33. data/lib/mysh/{internal/actions/help → help}/quick.txt +0 -0
  34. data/lib/mysh/{internal/actions/help → help}/ruby.txt +0 -0
  35. data/lib/mysh/{internal/actions/help → help}/show.txt +0 -0
  36. data/lib/mysh/{internal/actions/help → help}/term.txt +0 -0
  37. data/lib/mysh/{internal/actions/help → help}/timed.txt +0 -0
  38. data/lib/mysh/help/type.txt +28 -0
  39. data/lib/mysh/{internal/actions/help → help}/types.txt +0 -0
  40. data/lib/mysh/{internal/actions/help → help}/usage.txt +0 -0
  41. data/lib/mysh/{internal/actions/help → help}/vars.txt +4 -4
  42. data/lib/mysh/input_wrapper.rb +13 -13
  43. data/lib/mysh/internal.rb +20 -8
  44. data/lib/mysh/internal/{actions/cancel.rb → cancel.rb} +0 -0
  45. data/lib/mysh/internal/{actions/cd.rb → cd.rb} +2 -2
  46. data/lib/mysh/internal/{actions/comment.rb → comment.rb} +2 -2
  47. data/lib/mysh/internal/{actions/elapsed.rb → elapsed.rb} +2 -2
  48. data/lib/mysh/internal/{actions/exit.rb → exit.rb} +0 -0
  49. data/lib/mysh/internal/{actions/gls.rb → gls.rb} +6 -7
  50. data/lib/mysh/internal/{actions/help.rb → help.rb} +7 -9
  51. data/lib/mysh/internal/{actions/history.rb → history.rb} +10 -9
  52. data/lib/mysh/internal/load.rb +45 -0
  53. data/lib/mysh/internal/{actions/mls.rb → mls.rb} +2 -2
  54. data/lib/mysh/internal/{actions/pwd.rb → pwd.rb} +1 -1
  55. data/lib/mysh/internal/{actions/say.rb → say.rb} +1 -1
  56. data/lib/mysh/internal/{actions/show.rb → show.rb} +7 -6
  57. data/lib/mysh/internal/{actions/help → support}/sub_help.rb +9 -7
  58. data/lib/mysh/internal/type.rb +38 -0
  59. data/lib/mysh/internal/{actions/vars.rb → vars.rb} +8 -8
  60. data/lib/mysh/{init.rb → load_init_file.rb} +0 -0
  61. data/lib/mysh/process.rb +7 -7
  62. data/lib/mysh/quick.rb +3 -3
  63. data/lib/mysh/shell_variables.rb +6 -4
  64. data/lib/mysh/shell_variables/evaluate.rb +2 -11
  65. data/lib/mysh/shell_variables/shell_variable_keeper.rb +6 -7
  66. data/lib/mysh/shell_variables/shell_variable_store.rb +13 -14
  67. data/lib/mysh/{internal/actions/show → show}/env.rb +1 -1
  68. data/lib/mysh/{internal/actions/show → show}/gem.rb +0 -0
  69. data/lib/mysh/{internal/actions/show → show}/ruby.rb +0 -0
  70. data/lib/mysh/{internal/actions/show → show}/term.rb +0 -0
  71. data/lib/mysh/sources/console.rb +3 -2
  72. data/lib/mysh/sources/parse.rb +7 -10
  73. data/lib/mysh/sources/smart_auto_complete.rb +5 -5
  74. data/lib/mysh/sources/string.rb +6 -6
  75. data/lib/mysh/string_helpers.rb +37 -0
  76. data/lib/mysh/system.rb +2 -2
  77. data/lib/mysh/user_input.rb +4 -7
  78. data/lib/mysh/version.rb +4 -4
  79. data/mysh.gemspec +4 -4
  80. data/tests/my_shell_tests.rb +12 -3
  81. metadata +79 -81
  82. data/lib/mysh/internal/actions/actions_path.rb +0 -15
  83. data/lib/mysh/internal/actions/command_line/quit.rb +0 -19
  84. data/lib/mysh/internal/actions/load.rb +0 -36
  85. data/lib/mysh/internal/actions/type.rb +0 -22
  86. data/lib/mysh/internal/manage.rb +0 -20
  87. data/lib/mysh/internal/to_file_spec.rb +0 -26
  88. data/lib/mysh/pre_processor.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1181f7c07f14be213795e5af840e9364e838ada9
4
- data.tar.gz: 0005e8503ddd7a6905d834c85e01519f920ca65f
3
+ metadata.gz: 000475c46e41bf8fdeec692ac1dc789474800de0
4
+ data.tar.gz: '08c5c40b4a6b0c37a36735148f663a3cb56b3025'
5
5
  SHA512:
6
- metadata.gz: 536851ba0c923a4e2491d5abd50c417f8f3c6992cc61c885920d1c4654219c95efd40fbfcaf3a1574e94687a602248914b40a13a4a938f55993911d9903b3006
7
- data.tar.gz: 5ccbc4d1709a355aa9d3a8b065aacee3dbe9c6620bcfb26f70fd27b8fedd89cffdeb03d88314dd747a7d0b3d64977c7f6f303673791e26127ce81569b511f852
6
+ metadata.gz: 46bdcf6f4550ced7212ec3a3cc03293809dc3d423089e0b7b507e1417fd2ac6b13bfb431466d93b276299cf5802d0fff3194a2b529305e57ec958443bf17886b
7
+ data.tar.gz: 4fb03e994a8b1ce10a6347b0938e296a011ff40406a9479775e54ba514cc421d62a1f39345812d2a9df428cc46ed5340f3dd97fcf7e9c29a3f049b8b0bc9d68e
data/README.md CHANGED
@@ -423,6 +423,7 @@ $debug | Does the shell display additional debugging info (true/false)
423
423
  $h | The home folder's path
424
424
  $history | Is command line history enabled?
425
425
  $name | The name given to this mysh session.
426
+ $no_dups | Suppress duplicate entries in the history buffer.
426
427
  $no_move | Entries are not moved up when pulled from the command history.
427
428
  $page_height| The page height.
428
429
  $page_msg | The paging message. Default is "Press a key, a space, or q:"
@@ -435,6 +436,7 @@ $r | The location of the Ruby compiler.
435
436
  $s | The location of the host command interpreter.
436
437
  $t | The current time.
437
438
  $time_fmt | The format for the time: "%H:%M"
439
+ $type | Does the type command operate in cooked or raw mode. Default is raw mode.
438
440
  $u | The current user.
439
441
  $w | The current working directory's path.
440
442
 
@@ -558,18 +560,19 @@ none | General help on mysh.
558
560
  @ | Help on the show command.
559
561
  env | Help on the show env command.
560
562
  gem | Help on the show gem command.
561
- gls | Help on gls internal mysh command.
563
+ gls | Help on the gls command.
562
564
  help | This help on the help command.
563
565
  history | Help on the history command.
564
566
  init | Help on mysh initialization.
565
567
  kbd | Help on mysh keyboard mapping.
566
568
  math | Help on math functions.
567
- mls | Help on mls internal mysh command.
569
+ mls | Help on the mls command.
568
570
  quick | Help on quick commands.
569
571
  ruby | Help on the show ruby command.
570
572
  set | Help on mysh variables.
571
573
  show | Help on the show command.
572
574
  term | Help on the show term command.
575
+ type | Help on the type command.
573
576
  types | Help on mysh file types.
574
577
  usage | Help on mysh usage options.
575
578
  {{ | Help on mysh handlebars.
@@ -714,7 +717,7 @@ pwd | Display the current working directory.
714
717
  say <stuff> | Display the text in the command arguments.
715
718
  set <$name>=value| Set/query mysh variables.
716
719
  show <item> | Display information about a part of mysh.
717
- type <file> | Display a text file with support for optional embedded handlebars and mysh variables.
720
+ type <file> | Display one or more text files with optional support for embedded handlebars and shell variables.
718
721
 
719
722
  Notes:
720
723
  1. The notation {x} means that x is optional.
@@ -981,3 +984,14 @@ calling attention to some aspect that could use some TLC or a suggestion or an
981
984
  idea or a comment.
982
985
 
983
986
  This is a low pressure environment. All are welcome!
987
+
988
+ ## License
989
+
990
+ The gem is available as open source under the terms of the
991
+ [MIT License](./LICENSE.txt).
992
+
993
+ ## Code of Conduct
994
+
995
+ Everyone interacting in the fully_freeze project’s codebases, issue trackers,
996
+ chat rooms and mailing lists is expected to follow the
997
+ [code of conduct](./CODE_OF_CONDUCT.md).
@@ -5,26 +5,34 @@
5
5
  require 'pp'
6
6
  require 'English'
7
7
  require 'in_array'
8
+ require 'insouciant'
8
9
  require 'pause_output'
9
10
  require 'format_output'
11
+ require 'mini_readline'
12
+
13
+ # The path to the gem lib folder.
14
+ MYSH_LIB = (File.expand_path(File.dirname(__FILE__)) + "/").freeze
10
15
 
11
16
  require_relative 'mysh/exceptions'
17
+ require_relative 'mysh/string_helpers'
12
18
  require_relative 'mysh/input_wrapper'
13
19
  require_relative 'mysh/user_input'
20
+ require_relative 'mysh/action'
21
+ require_relative 'mysh/action_pool'
14
22
  require_relative 'mysh/internal'
15
23
  require_relative 'mysh/quick'
16
24
  require_relative 'mysh/external'
25
+ require_relative 'mysh/command_line'
17
26
  require_relative 'mysh/system'
18
27
  require_relative 'mysh/handlebars'
19
28
  require_relative 'mysh/shell_variables'
20
- require_relative 'mysh/pre_processor'
21
29
  require_relative 'mysh/process'
22
30
  require_relative 'mysh/globalize'
23
- require_relative 'mysh/init'
31
+ require_relative 'mysh/load_init_file'
24
32
  require_relative 'mysh/expression'
25
33
  require_relative 'mysh/version'
26
34
 
27
- # The Mysh (MY SHell) module. A container for mysh and its functionality.
35
+ # The Mysh (MY SHell) module.
28
36
  module Mysh
29
37
 
30
38
  # The actual shell method.
@@ -1,35 +1,35 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/action.rb -- The framework of mysh internal actions.
3
+ # The framework of mysh internal actions.
4
4
  module Mysh
5
5
 
6
- #The mysh internal action class.
6
+ # The mysh internal action class.
7
7
  class Action
8
- #The name of the action.
8
+ # The name of the action.
9
9
  attr_reader :name
10
10
 
11
- #The description of the action.
11
+ # The description of the action.
12
12
  attr_reader :description
13
13
 
14
- #Setup an internal action.
14
+ # Setup an internal action.
15
15
  def initialize(name = "", description = "", &action)
16
16
  @name, @description = name, description.in_array
17
17
 
18
18
  define_singleton_method(:process_command, &action) if block_given?
19
19
  end
20
20
 
21
- #Parse the string and call the action.
21
+ # Parse the string and call the action.
22
22
  def process_quick_command(input)
23
23
  process_command(input.quick)
24
24
  :internal
25
25
  end
26
26
 
27
- #Get information about the action.
27
+ # Get information about the action.
28
28
  def action_info
29
29
  [@name].concat(@description)
30
30
  end
31
31
 
32
- #Get the name without any argument descriptions.
32
+ # Get the name without any argument descriptions.
33
33
  def short_name
34
34
  name.split[0] || ""
35
35
  end
@@ -1,31 +1,31 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/action_pool.rb -- A managed hash of mysh actions.
3
+ # A managed hash of mysh actions.
4
4
  module Mysh
5
5
 
6
- #* A managed hash of mysh actions.
6
+ # A managed hash of mysh actions.
7
7
  class ActionPool
8
8
 
9
- #The name of this action pool.
9
+ # The name of this action pool.
10
10
  attr_reader :pool_name
11
11
 
12
- #Create a new action pool
12
+ # Create a new action pool
13
13
  def initialize(pool_name, default_action = nil)
14
14
  @pool_name, @pool = pool_name, {}
15
15
  @pool.default = default_action
16
16
  end
17
17
 
18
- #Get a action.
18
+ # Get a action.
19
19
  def [](index)
20
20
  @pool[index]
21
21
  end
22
22
 
23
- #Does this action exist?
23
+ # Does this action exist?
24
24
  def exists?(index)
25
25
  @pool.key?(index)
26
26
  end
27
27
 
28
- #Add an action to the pool.
28
+ # Add an action to the pool.
29
29
  def add_action(action)
30
30
  short_name = action.short_name
31
31
 
@@ -36,7 +36,7 @@ module Mysh
36
36
  @pool[short_name] = action
37
37
  end
38
38
 
39
- #Get information on all actions.
39
+ # Get information on all actions.
40
40
  def actions_info
41
41
  @pool
42
42
  .values
@@ -1,23 +1,23 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/actions/command_line.rb -- The mysh internal command line option.
3
+ # The command line options of mysh.
4
4
  module Mysh
5
5
 
6
6
  # Action pool of command line options.
7
7
  COMMAND_LINE = ActionPool.new("COMMAND_LINE")
8
8
 
9
- #* mysh/internal/actions/command_line.rb -- The mysh internal command line option.
9
+ # A mysh command line option.
10
10
  class CommandOption < Action
11
11
 
12
- #Execute a pre-boot command line option.
12
+ # Execute a pre-boot command line option.
13
13
  def pre_boot(_args); end
14
14
 
15
- #Execute a post-boot command line option.
15
+ # Execute a post-boot command line option.
16
16
  def post_boot(_args); end
17
17
 
18
18
  alias :process_command :pre_boot
19
19
 
20
- #Get an argument for an option.
20
+ # Get an argument for an option.
21
21
  def get_arg(read_point)
22
22
  result = read_point.next
23
23
  fail if COMMAND_LINE.exists?(result) #An arg should not be a command!
@@ -28,9 +28,8 @@ module Mysh
28
28
 
29
29
  end
30
30
 
31
- #Execute command line options.
32
- #<br>Endemic Code Smells
33
- #* :reek:TooManyStatements
31
+ # Execute command line options.
32
+ # Endemic Code Smells :reek:TooManyStatements
34
33
  def self.process_command_args(args, phase)
35
34
  read_point = args.each
36
35
 
@@ -56,5 +55,6 @@ module Mysh
56
55
 
57
56
  end
58
57
 
59
- #Load up the extra help actions!
60
- Dir[Mysh::Action::ACTIONS_PATH + 'command_line/*.rb'].each {|file| require file }
58
+ # Load up the extra help actions!
59
+ path = MYSH_LIB + "mysh/command_line/*.rb"
60
+ Dir[path].each {|file| require file }
@@ -1,38 +1,36 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/actions/command_line/debug.rb -- The mysh help command debug.
3
+ # The mysh help command debug.
4
4
  module Mysh
5
5
 
6
- #* mysh/internal/actions/command_line/debug.rb -- The mysh help command debug.
6
+ # The mysh help command debug.
7
7
  class DebugOption < CommandOption
8
8
 
9
- #Execute the help command line option.
10
- #<br>Endemic Code Smells
11
- #* :reek:UtilityFunction
9
+ # Execute the help command line option.
10
+ # Endemic Code Smells :reek:UtilityFunction
12
11
  def post_boot(_args)
13
12
  MNV[:debug] = "on"
14
13
  end
15
14
 
16
15
  end
17
16
 
18
- #Add the debug command line option to the library.
17
+ # Add the debug command line option to the library.
19
18
  desc = 'Turn on mysh debugging.'
20
19
  COMMAND_LINE.add_action(DebugOption.new('--debug', desc))
21
20
  COMMAND_LINE.add_action(DebugOption.new('-d', desc))
22
21
 
23
- #* mysh/internal/actions/command_line/debug.rb -- The mysh help command no debug.
22
+ # The mysh help command no debug.
24
23
  class NoDebugOption < CommandOption
25
24
 
26
- #Execute the help command line option.
27
- #<br>Endemic Code Smells
28
- #* :reek:UtilityFunction
25
+ # Execute the help command line option.
26
+ # Endemic Code Smells :reek:UtilityFunction
29
27
  def post_boot(_args)
30
28
  MNV[:debug] = "off"
31
29
  end
32
30
 
33
31
  end
34
32
 
35
- #Add the debug command line option to the library.
33
+ # Add the debug command line option to the library.
36
34
  desc = 'Turn off mysh debugging.'
37
35
  COMMAND_LINE.add_action(NoDebugOption.new('--no-debug', desc))
38
36
  COMMAND_LINE.add_action(NoDebugOption.new('-nd', desc))
@@ -1,12 +1,12 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/actions/command_line/init.rb -- The mysh init and no-init commands.
3
+ # The mysh init and no-init commands.
4
4
  module Mysh
5
5
 
6
- #* mysh/internal/actions/command_line/init.rb -- The mysh init command.
6
+ # The mysh init command.
7
7
  class InitOption < CommandOption
8
8
 
9
- #Skip over the argument for pre_boot.
9
+ # Skip over the argument for pre_boot.
10
10
  def pre_boot(read_point)
11
11
  file_name = get_arg(read_point).to_host_spec
12
12
 
@@ -19,23 +19,23 @@ module Mysh
19
19
  mysh "load #{file_name}"
20
20
  end
21
21
 
22
- #Execute the init command line option.
22
+ # Execute the init command line option.
23
23
  def post_boot(read_point)
24
24
  get_arg(read_point)
25
25
  end
26
26
 
27
27
  end
28
28
 
29
- #Add the init command line option to the library.
29
+ # Add the init command line option to the library.
30
30
  desc = 'Initialize mysh by loading the specified file.'
31
31
  COMMAND_LINE.add_action(InitOption.new('--init filename', desc))
32
32
  COMMAND_LINE.add_action(InitOption.new('-i filename', desc))
33
33
 
34
34
 
35
- #* mysh/internal/actions/command_line/init.rb -- The mysh no init command.
35
+ # The mysh no init command.
36
36
  class NoInitOption < CommandOption
37
37
 
38
- #Skip over the argument for pre_boot.
38
+ # Skip over the argument for pre_boot.
39
39
  def pre_boot(_args)
40
40
  fail "The mysh is already initialized." if $mysh_init_file
41
41
  $mysh_init_file = "<none>"
@@ -43,7 +43,7 @@ module Mysh
43
43
 
44
44
  end
45
45
 
46
- #Add the no init command line option to the library.
46
+ # Add the no init command line option to the library.
47
47
  desc = 'Do not load a file to initialize mysh.'
48
48
  COMMAND_LINE.add_action(NoInitOption.new('--no-init', desc))
49
49
  COMMAND_LINE.add_action(NoInitOption.new('-ni', desc))
@@ -1,24 +1,24 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/actions/command_line/load.rb -- The mysh load command.
3
+ # The mysh load command.
4
4
  module Mysh
5
5
 
6
- #* mysh/internal/actions/command_line/load.rb -- The mysh load command.
6
+ # The mysh load command.
7
7
  class LoadOption < CommandOption
8
8
 
9
- #Skip over the argument for pre_boot.
9
+ # Skip over the argument for pre_boot.
10
10
  def pre_boot(read_point)
11
11
  get_arg(read_point)
12
12
  end
13
13
 
14
- #Execute the load command line option.
14
+ # Execute the load command line option.
15
15
  def post_boot(read_point)
16
16
  mysh "load #{get_arg(read_point).to_host_spec}"
17
17
  end
18
18
 
19
19
  end
20
20
 
21
- #Add the load command line option to the library.
21
+ # Add the load command line option to the library.
22
22
  desc = 'Load the specified file into the mysh.'
23
23
  COMMAND_LINE.add_action(LoadOption.new('--load filename', desc))
24
24
  COMMAND_LINE.add_action(LoadOption.new('-l filename', desc))
@@ -5,9 +5,8 @@ module Mysh
5
5
  # The page pause option.
6
6
  class PauseOption < CommandOption
7
7
 
8
- #Execute the help command line option.
9
- #<br>Endemic Code Smells
10
- #* :reek:UtilityFunction
8
+ # Execute the help command line option.
9
+ # Endemic Code Smells :reek:UtilityFunction
11
10
  def post_boot(_args)
12
11
  MNV[:page_pause] = "on"
13
12
  end
@@ -18,16 +17,15 @@ module Mysh
18
17
 
19
18
  end
20
19
 
21
- #Add the pause command line option to the library.
20
+ # Add the pause command line option to the library.
22
21
  desc = 'Turn on page pauses.'
23
22
  COMMAND_LINE.add_action(PauseOption.new('--pause', desc))
24
23
 
25
24
  # The no page pause option.
26
25
  class NoPauseOption < CommandOption
27
26
 
28
- #Execute the help command line option.
29
- #<br>Endemic Code Smells
30
- #* :reek:UtilityFunction
27
+ # Execute the help command line option.
28
+ # Endemic Code Smells :reek:UtilityFunction
31
29
  def post_boot(_args)
32
30
  MNV[:page_pause] = "off"
33
31
  end
@@ -38,7 +36,7 @@ module Mysh
38
36
 
39
37
  end
40
38
 
41
- #Add the no pause command line option to the library.
39
+ # Add the no pause command line option to the library.
42
40
  desc = 'Turn off page pauses.'
43
41
  COMMAND_LINE.add_action(NoPauseOption.new('--no-pause', desc))
44
42
  end
@@ -1,43 +1,41 @@
1
1
  # coding: utf-8
2
2
 
3
- #* mysh/internal/actions/command_line/prompt.rb -- The mysh post prompt command.
3
+ # The mysh post prompt command.
4
4
  module Mysh
5
5
 
6
- #* mysh/internal/actions/command_line/post_prompt.rb -- The mysh post prompt command.
6
+ # The mysh post prompt command.
7
7
  class PostpromptOption < CommandOption
8
8
 
9
- #Skip over the argument for pre_boot.
9
+ # Skip over the argument for pre_boot.
10
10
  def pre_boot(read_point)
11
11
  get_arg(read_point)
12
12
  end
13
13
 
14
- #Execute the prompt command line option.
15
- #<br>Endemic Code Smells
16
- #* :reek:UtilityFunction
14
+ # Execute the prompt command line option.
15
+ # Endemic Code Smells :reek:UtilityFunction
17
16
  def post_boot(read_point)
18
17
  MNV[:post_prompt] = get_arg(read_point)
19
18
  end
20
19
 
21
20
  end
22
21
 
23
- #Add the post prompt command line option to the library.
22
+ # Add the post prompt command line option to the library.
24
23
  desc = 'Set the mysh line continuation prompt to "str".'
25
24
  COMMAND_LINE.add_action(PostpromptOption.new('--post-prompt "str"', desc))
26
25
  COMMAND_LINE.add_action(PostpromptOption.new('-pp "str"', desc))
27
26
 
28
- #* mysh/internal/actions/command_line/post_prompt.rb -- The mysh command no post prompt.
27
+ # The mysh command no post prompt.
29
28
  class NoPostpromptOption < CommandOption
30
29
 
31
- #Execute the no post prompt command line option.
32
- #<br>Endemic Code Smells
33
- #* :reek:UtilityFunction
30
+ # Execute the no post prompt command line option.
31
+ # Endemic Code Smells :reek:UtilityFunction
34
32
  def post_boot(_args)
35
33
  MNV[:post_prompt] = ""
36
34
  end
37
35
 
38
36
  end
39
37
 
40
- #Add the prompt command line option to the library.
38
+ # Add the prompt command line option to the library.
41
39
  desc = 'Turn off mysh post prompting.'
42
40
  COMMAND_LINE.add_action(NoPostpromptOption.new('--no-post-prompt', desc))
43
41
  COMMAND_LINE.add_action(NoPostpromptOption.new('-npp', desc))