Skip to content

Commit 1228790

Browse files
committed
Merge pull request #136 from jazzdelightsme/master
Bind F8 to HistorySearch*, similar to cmd.exe.
2 parents b41113e + 649e48f commit 1228790

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,7 @@ UpgradeLog*.XML
112112
#Chocolatey Build Output
113113
ChocolateyPackage/PSReadLine/
114114
*.nupkg
115+
116+
# gvim swap files
117+
*.swp
118+
*.swo

PSReadLine/KeyBindings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ void SetDefaultWindowsBindings()
134134
{ Keys.AltQuestion, MakeKeyHandler(WhatIsKey, "WhatIsKey") },
135135
{ Keys.F3, MakeKeyHandler(CharacterSearch, "CharacterSearch") },
136136
{ Keys.ShiftF3, MakeKeyHandler(CharacterSearchBackward, "CharacterSearchBackward") },
137+
{ Keys.F8, MakeKeyHandler(HistorySearchBackward, "HistorySearchBackward") },
138+
{ Keys.ShiftF8, MakeKeyHandler(HistorySearchForward, "HistorySearchForward") },
137139
{ Keys.PageUp, MakeKeyHandler(ScrollDisplayUp, "ScrollDisplayUp") },
138140
{ Keys.PageDown, MakeKeyHandler(ScrollDisplayDown, "ScrollDisplayDown") },
139141
};

PSReadLine/Keys.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public static class Keys
249249
public static ConsoleKeyInfo F24 = new ConsoleKeyInfo((char)0, ConsoleKey.F24, false, false, false);
250250

251251
public static ConsoleKeyInfo ShiftF3 = new ConsoleKeyInfo((char)0, ConsoleKey.F3, true, false, false);
252+
public static ConsoleKeyInfo ShiftF8 = new ConsoleKeyInfo((char)0, ConsoleKey.F8, true, false, false);
252253

253254
// Keys to ignore
254255
public static ConsoleKeyInfo VolumeUp = new ConsoleKeyInfo((char)0, ConsoleKey.VolumeUp, false, false, false);

PSReadLine/en-US/about_PSReadline.help.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ LONG DESCRIPTION
208208

209209
Search backward from the current history line interactively.
210210

211-
HistorySearchBackward (Cmd: unbound Emacs: unbound)
211+
HistorySearchBackward (Cmd: <F8> Emacs: unbound)
212212

213213
Replace the current input with the 'previous' item from PSReadline history
214214
that matches the characters between the start and the input and the cursor.
215215

216-
HistorySearchForward (Cmd: unbound Emacs: unbound)
216+
HistorySearchForward (Cmd: <Shift+F8> Emacs: unbound)
217217

218218
Replace the current input with the 'next' item from PSReadline history
219219
that matches the characters between the start and the input and the cursor.

0 commit comments

Comments
 (0)