File and folder history in Copy/Move dialogs

Something is missing in Far Manager? You have a great idea that should be heard? Write here.
Post Reply
pepak
Posts: 539
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 15 times
Been thanked: 47 times

File and folder history in Copy/Move dialogs

Post by pepak »

I wonder, would it be possible to add support for File History (ALT+F11) and Folder History (ALT+F12) to the Destination editbox in Copy and Move dialogs? That would make it far easier to perform a repeated copy or move to the same destination folder from different source folders.

And it could be even more powerful if the editbox's history could be made searchable. Currently, the search is based on the beginning of the filename, but that makes it difficult to navigate complex paths; if there was a hotkey to make a fulltext search of the history, that problem would be greatly alleviated and I expect many other dialogs would benefit from this feature as well.

Incidentally, now that I am thinking about it, the Destination editbox of the Copy/Move dialog could also support autocompletion similar to that of the FAR's command line...
User avatar
HaRT
Moderator
Posts: 9648
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 117 times
Been thanked: 244 times

File and folder history in Copy/Move dialogs

Post by HaRT »

First of all, the destination edit fields have histories of previously accepted values (if you have the ), and these can be filtered incrementally upon pressing CtrlAltF (or by using e.g. the SmartMenuFilter script); and so do the built-in Folders and View/Edit histories. Next, despite the built-in histories are not accessible from dialogs, there are superior history plugins (AltHistory, MoreHistory, LuaFAR History), and at least AltHistory is callable from dialogs and the selected item can be inserted into the edit field.

Also, the field does , you may just need to tweak its .
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 539
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 15 times
Been thanked: 47 times

File and folder history in Copy/Move dialogs

Post by pepak »

Thank you, HaRT.
HaRT wrote: Sun 10 Jan, 2021 18:14 First of all, the destination edit fields have histories of previously accepted values (if you have the respective dialog option on),
Yes, I know and use that.
and these can be filtered incrementally upon pressing CtrlAltF
That does not work for me. I may be missing a necessary first step, but all CtrlAltF does for me is close the history list. The help does mention it under "Menu control commands", along with RAlt which does indeed work for me (although it is a bit clunky, I have to open the history using CtrlDown, then activate the filter using RAlt and then I can search all of the history. I will need to figure out a script that will do all of that using just one hotkey.

* Added after more testing: CtrlAltF also works, but only if I open the history with CtrlDown. Not if I open it just by typing something.
(or by using e.g. the SmartMenuFilter script);
I will try that out.
there are superior history plugins (AltHistory, MoreHistory, LuaFAR History), and at least AltHistory is callable from dialogs and the selected item can be inserted into the edit field.
I used to use AltHistory, but it did have some side-effects for me which made me uninstall it. I don't know what they were anymore, possibly the sheer amount of data they save. Anyway, I think it would be nice if FAR could use its own histories in its dialogs. Guess that's something to do for my personalized build then.
Also, the field does support autocompletion, you may just need to tweak its AutoComplete settings (please see its Help for additional hints).
Yes, it does. I got confused by the fact that the true history items were shown first and I never scrolled to the autocomplete ones.
Last edited by pepak on Sun 10 Jan, 2021 19:42, edited 1 time in total.
User avatar
HaRT
Moderator
Posts: 9648
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 117 times
Been thanked: 244 times

File and folder history in Copy/Move dialogs

Post by HaRT »

pepak wrote: Sun 10 Jan, 2021 19:34 Guess that's something to do for my personalized build then.
If/when you happen to implement that, maybe it's worth a pull request to the main Far repo…
Фар есть инструмент, а не нянька. © 2009 DrKnS
citRiks
Posts: 1095
Joined: Fri 25 Oct, 2019 18:18
Has thanked: 340 times
Been thanked: 56 times

File and folder history in Copy/Move dialogs

Post by citRiks »

I think it would be more usable, if the auto-complete history in dialog elements will start with "any middle part" (*<your-typing>*), and not with "beginning part" (<your-typing>*)
together with that, i think all the subject of autocompleting/history should be redisigned, to the direction of supporting "globbing" with wildcards, or/and as FZF and other many tools demonstrates, kind of "bring me most similar".

Last edited by citRiks on Mon 11 Jan, 2021 15:38, edited 2 times in total.
А кто не поверит в наше миролюбие, / Тот кровью умоется. / И будет такая борьба за мир, / Что камня на камне не останется.
pepak
Posts: 539
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 15 times
Been thanked: 47 times

File and folder history in Copy/Move dialogs

Post by pepak »

I didn't do much testing, but it seems to work. The first patch isn't absolutely necessary, but of course if it is skipped, then the second one needs to be slightly modified because it makes use of the skipped parameter.

Applicable using git apply patch-file.patch.
Attachments
0002-Select-copy-move-destination-from-histories.patch.zip
Select copy/move destination from histories
(1.47 KiB) Downloaded 4 times
0001-Automatically-switch-History-menus-into-the-filtered.patch.zip
Automatically switch History menus into the filtered mode
(2.46 KiB) Downloaded 3 times
Last edited by pepak on Sun 17 Jan, 2021 17:45, edited 1 time in total.
Post Reply

Return to “Suggestions and Ideas”