Skip to content

Adding readline capabilities to shell (like keyboard shortcuts for editing text, history, and auto-completion) #1625

Open
@n3rada

Description

@n3rada

I would very much like to improve the shell command interface in Sliver to allow easier editing of pasted commands. Currently, when a command is pasted into the shell interface, making changes, particularly towards the beginning or middle of the command, can be tedious.

This feature would be particularly useful for commands requiring only minor modification, such as changing a file name or path.

sliver (BIG_ATHLETE) > shell

? This action is bad OPSEC, are you an adult? Yes

[*] Wait approximately 10 seconds after exit, and press <enter> to continue
[*] Opening shell tunnel (EOF to exit) ...

[*] Started remote shell with pid 10608

PS C:\Windows\system32> ^[[A^[[D^[[C^[[B

Consider the following scenario where the user pastes a PowerShell command and needs to modify it:

PS C:\Windows\system32> gci C:\ -filter local.txt -rec -ea 0 | % { "$($_.FullName) -> $((gc $_.FullName) -join ' ')" }

If the user needs to change local.txt to config.txt, it currently could not to this because it is even not able to move character by character.

Isn't it possible to use the same behavior as rlwrap in this context? Or a special go plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions