Merge lp://staging/~ipv64ever/terminator/custom_commands_plugin_complex_cmd into lp://staging/terminator/gtk3

Proposed by Korotin Igor
Status: Needs review
Proposed branch: lp://staging/~ipv64ever/terminator/custom_commands_plugin_complex_cmd
Merge into: lp://staging/terminator/gtk3
Diff against target: 355 lines (+144/-26)
2 files modified
terminatorlib/plugins/custom_commands.py (+113/-26)
tests/test_custom_command_parser.py (+31/-0)
To merge this branch: bzr merge lp://staging/~ipv64ever/terminator/custom_commands_plugin_complex_cmd
Reviewer Review Type Date Requested Status
Terminator Pending
Review via email: mp+358771@code.staging.launchpad.net

Commit message

Custom Commands Plugin: Added complex option.

This option enables parsing of special characters in command:
  \n - send new line
  \p - add 1 sec delay

This new option doesn't conflict with old Custom Command config.
By default all existing commands get this option disabled

Added unit tests of command parsing command.

Description of the change

At this moment Custom commands plugin allow to send only one string with ending '\n' character.

I suggest to add ability to create complex command. Each part of command is sent one by one.
For example command "command1\ncommand2\ncommand3" will be made as following:

'command1\n'
'command2\n'
'command3\n'

There's also an ability to add delays between commands using "\p" chars.
Example 'command1\n\pcommand2\n\p\pcommand3' will be made as following:

'command1\n'
1 sec delay
'command2\n'
2 sec delay
'command3\n'

Command parsing affects only on these two "\n" and "\p" characters in command

I use terminator in my work and i often have to login on embedded boards remotely through serial port.
Each time i type login, then send password using custom command, then sudo su and finally root password again. It's anoying especially when i have to do it a lot.

To post a comment you must log in.

Unmerged revisions

1811. By Igor Korotin <email address hidden>

Custom Commands Plugin: Added complex option.

This option enables parsing of special characters in command:
  \n - send new line
  \p - add 1 sec delay

This new option doesn't conflict with old Custom Command config.
By default all existing commands get this option disabled

Added unit tests of command parsing command.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: