Set multiple keyhandlers at once or have configuration file? #2382
Replies: 2 comments
-
Honestly, when I was first reading about PSReadLine and when the readme referenced the sample profile, I'd hoped it meant that PSReadLine supported loading its own .ps1 profile. While I know now that that's not the case, I was excited about that prospect, since, like yours, much of my $profile is devoted to PSReadLine options. With that in mind, I really like the idea of being able to export/import PSReadLine options. |
Beta Was this translation helpful? Give feedback.
-
A configuration file was definitely considered, probably even my first thought. I went with cmdlets for configuration because:
Binding multple key handlers with one invocation might be handy, but it does feel a bit like yak shaving at this point. |
Beta Was this translation helpful? Give feedback.
-
A good portion of my
$profile
is to set PSReadLine options and keyhandlers. I wonder if it makes sense to haveSet-PSReadLineKeyHandler
accept a hashtable of chords and functions/scriptblocks to allow setting multiple keyhandlers with one call to the cmdlet or alternatively, haveSet-PSReadLineConfiguration
andExport-PSReadLineConfiguration
whereExport
would produce a json (?) file that contains all options and keyhandlers that could then be fed toSet
to apply. This might also make it easier to share options/keyhandlers.Beta Was this translation helpful? Give feedback.
All reactions