仓库指标
- Star
- (35,764 star)
- PR 合并指标
- (平均合并 27天 19小时) (30 天内合并 24 个 PR)
描述
Description of the new feature/enhancement
Paste Slowly - A new type of Action
Is needed to allow the use of Windows Terminal to operate remote devices based on SSH/Telnet/Serial connections. The buffers of some remote consoles do not deal very well with to quick insertion of caracteres.
Example: When configuring a Cisco/Juniper or similar device thought Serial Ports with low-speed connections (like 9600-8-n-1), if you paste a substantial number of configuration lines, is highly likely that some characters will be swallowed, resulting on errors at the final config.
The objective is to create new type of action called on Windows Terminal that Could be Called "Paste Slowly". -> Or any other better name the community define for that.
With that new action "Paste Slowly", Windows Terminal will process the Copy/Paste buffer, and when inserting each character on the console, will respect the delay defined for each specific character defined on the configurations of Windows Terminal.
Proposed technical implementation details (optional)
Deciding when execute "Paster Slowly" instead of "Normal Paste" - Will be defined by: A - Specific Key-Shortcut defined at Configuration->Actions (Ex.: CTRL+V -> Normal Paste, CTRL+Shift+V -> Paste Slowly.) B - Size of the Copy/Paste buffer on a Paste action. -> If bigger than NumBytesToPasteSlowly bytes, will prompt an action choose screen, questioning if "Normal Paste" or "Paste Slowly" should be used (like the warning that appears when the Paste Buffer have multiples lines). With a small checkbox defining "Remember that choice".
On Configurations should exist a Multiple-Choice option that will define the behavior of that "Warning POP" with the following options: - Always "Normal Paste" - Always "Paste Slowly" - Prompt for choosing the type of Paste action if Paste Buffer is bigger than NumBytesToPasteSlowly
On Configurations should exist an Array of Delay Definition to Paste Slowly The Array will have 2 attributes:
- Character
- Time to Delay The sequence of the array will need to be defined by the Windows Terminal user, and the Rules of delay insertion will be processed Top-Down.
The "Character" attribute, will contain:
- Groups of characters like "Any Character", "OnlyNumbers", "OnlyAlphaUpperCase", "OnlyAlphaLowerCase", etc.
- Specific common character (Ex.: "A", "B","C", "a", "b","c", "1", "2","3", "!", "#", etc.)
- Special characters (Ex.: LineBreak, EndOfFile, etc.)
- {Maybe consider allowing the use of Regex to give freedom Windows Terminal User?}
The "Time to Delay" attribute will contain:
- A number positive number between 0 and 2000 that will represent the number of milliseconds that Windows Terminal will wait until processing next character on Paste Buffer.