We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4f0f9d3 + 0c94f36 commit de2ffbeCopy full SHA for de2ffbe
src/hike/widgets/command_line/widget.py
@@ -156,9 +156,15 @@ def _history_suggester(self) -> SuggestFromList:
156
be used.
157
"""
158
return SuggestFromList(
159
- reversed(list(self.history))
160
- if self.history
161
- else chain(*(command.suggestions() for command in COMMANDS))
+ [
+ # Start off with the history, with the most recently-used
+ # commands first so suggestions come from the thing
162
+ # most-recently done.
163
+ *reversed(list(self.history)),
164
+ # Tack known commands on the end; this means that the user
165
+ # will get prompted for commands they've not used yet.
166
+ *chain(*(command.suggestions() for command in COMMANDS)),
167
+ ]
168
)
169
170
def compose(self) -> ComposeResult:
0 commit comments