Live Template or text expansion in Rider terminal?

Is there any way to trigger a live template or text expansion in the terminal? I have an AWS cli action wired up in Windows Terminal so I just press CTRL+SHIFT+S to log in to AWS. I haven't figured out how to do something similar in Rider terminal. Any ideas?

0
3 comments

Hello,

Thank you for contacting Rider support.

For example, if you use powershell terminal in Rider, you can create Set-PSReadLineKeyHandler for yourself. Placing such a script in your $PROFILE would allow future sessions to use the scripted shortcut. (I verified this on MacOS with pwsh terminal installed)

For example:

Set-PSReadLineKeyHandler 'alt+c' -ScriptBlock {
  [Microsoft.PowerShell.PSConsoleReadLine]::Insert('code .')
  [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
}

What the approach did you use to script the mentioned command and what your OS you are on?

1

Windows. This worked. Thank you.

0
Hello,

Thank you for keeping me posted! I am glad to hear that I was able to help.
If there are no other questions, then I am going to proceed with archiving this ticket.
Should you have any other questions or difficulties in the future, do not hesitate to contact support.

Have a nice day!
0

Please sign in to leave a comment.