horeah/PyCmd

Interactive directory history

Closed this issue · 4 comments

In order to allow for a longer directory history PyCmd should use an interactive, searchable Window (similar to the one used for zsh-style completions) when Alt-D is pressed.

A prototype implementation can be checked out on branch new_dirhist

@ufo You had some interesting ideas related to the directory history -- from what I can tell from your https://github.com/ufo/pycmd; how do you feel about this proposal?

In my view, the main advantages compared to the current directory history are:

  1. transient "window"-like behavior avoids polluting the screen content
  2. incremental search allows for a longer history (the current proof-of-concept uses 30)
  3. remove code and complexity

The biggest disadvantage is that the "jump-to-number" functionality is no longer supported -- we could maybe introduce support for Alt-N in the general Window class?

ufo commented

I just tried it out and I really think it is awesome! And I'm sure it would also make my own approach with a second fixed dir history (favorites) unnecessary, once finding an every day project folder is easy by starting to type its name.
Regarding the disadvantage. To be honest I tried the ALT-N Feature a few times in the past but could never really get used to it. I always felt comfortable enough navigating it with UP and DOWN keys. So personally I wouldn't miss anything. But of course I can only speak for myself.

horeah commented

This was merged a while ago and is part of the 20230202 release (I forgot to close the issue).
Thanks everyone for the feedback!