Ticket #70 (new defect)
savannah: enter vfs with cmdline buffer
Reported by: | me4mc | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Future Releases |
Component: | mc-vfs | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description (last modified by ossi) (diff)
Original: http://savannah.gnu.org/bugs/?20182
Submitted by: | me <me4mc> | Submitted on: | Sat 16 Jun 2007 07:36:43 AM UTC |
Category: | Keyboard input | Severity: | 3 - Norma |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Release: | 4.6.1 | Operating System: | GNU/Linux |
Original submission:
action: press ctrl+pgdown to enter a archive (vfs) result: nothing happens expect: enter archive fix: press enter problem: commandline must be empty fix: add regex_command (selection (panel)->fname, "Open", 0) to ctrl_next_page handler hope this shortens the todolist
Comment 1 by Pavel Tsekov <ptsekov> at Thu 23 Aug 2007 02:58:10 PM UTC:
Using regex_command(..., "Open", ...) doesn't always translate to "cd path#vfs" - it may end up executing external commands. I am not sure whether this behaviour is desired for Ctrl + PgDn...
Comment 2 by me <me4mc> at Thu 23 Aug 2007 04:01:16 PM UTC:
afairemember the regex_command is what pressing return does. i just added it for the existing key binding - didnt really think that far :(. imo crtl+pgdn/pgup should only cd, never execute. is changing 'do_cd' the more clean approach?
Comment 3 by Pavel Tsekov <ptsekov> at Fri 24 Aug 2007 02:34:08 PM UTC:
do_cd() needs a vfs path to enter into archives or connect to ftp or ssh servers. So, if you press Ctrl+PgDn on a, say, .zip file, you need to: a) determine the file type (as regex_open() does) b) translate the path to vfs path c) pass the vfs path to do_cd() Maybe regex_open() can be modified so that it will recognize a new action which will make it return the vfs path for a given path ... or something like that.
Comment 4 by me <me4mc> at Sat 06 Oct 2007 09:03:19 AM UTC:
i finaly managed to read the code: a) regex_open does a lot i wont copy to a new function that should only cd. it parses the EXT file and determines by type and action what to do about the string. the only clean way through it would be to introduce a new keyword in EXT (eg 'Chdir') and copy the Open directive for archives. this still leads to the problem that if someone changes his EXT file to contain something like shell/sh Chdir=evilscript %f that script it will execute instead of doing nothing. some users might even dislike that they must extend their ext file b&c are solved by altering translated_mc_chdir to do the regex command in case mc_chdir fails. then use translated_mc_chdir instead of mc_chdir in _do_panel_cd (move code before _do_panel_cd) please ack if you like this idea main.c:606,1028 ext.c:416,594
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
added by me4mc