Ticket #4295 (new enhancement) — at Version 3

Opened 3 years ago

Last modified 3 years ago

Tilde + username expansion in copy/move dialogs does not work

Reported by: ZlatkO Owned by:
Priority: minor Milestone:
Component: mc-core Version: master
Keywords: tilde username expansion tab completion Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by ossi) (diff)

Completion does not work for tilde + username expansion (i.e., to expand to a certain user's $HOME) in copy/move dialogs. If I enter a tilde character in the destination field followed by one or more characters (ie. ~apa) and then hit <Alt+TAB>, nothing happens. If I complete the username myself, followed by a slash (ie. ~apache/), then the rest of the <Alt+TAB> completion works as expected.

So it seems that MC actually does understand the ~username/ concept as such in the copy/move dialogs (i.e., files do end up in the correct destination), but it can't complete the ~userna<Alt+TAB> part by itself. I'm pretty sure that this did already work in some earlier version, but I'm not 100% sure. :-)

Fun fact: in MC's command line widget, this works just fine, i.e., entering ~apa<Alt+TAB> gets properly completed to ~apache/. So the command line widget's completion code path is probably a different one than the copy/move dialog's one.

Change History

comment:1 Changed 3 years ago by andrew_b

This is totally unclear for me. What is ~apache? What is username?

Please provide a step-by-step description how to reproduce this bug.

Last edited 3 years ago by andrew_b (previous) (diff)

comment:2 Changed 3 years ago by zaytsev

What do you mean by the command line widget? Do you mean Quick CD or the shell dialog? If it's the latter, then yes, of course, expansion works, because your shell does this, and it has nothing to do with mc. In as far as copy & move dialogs are concerned, there is special code to interpret ~, but apparently it's not tied to the simple completion engine for the widget...

@Andrew he probably means that if you press Esc-Tab in the copy dialog path entry box, then you get completion, but if you enter ~ and press Esc-Tab, then there is no completion, but he expects expansion in /home/username.

comment:3 Changed 3 years ago by ossi

  • Description modified (diff)

adjusted misleading wording - the expansion itself works just fine.
also, replaced plain <TAB>, as this obviously can't work (at least in a default config).

Note: See TracTickets for help on using tickets.