Ticket #2116 (closed defect: invalid)

Opened 10 years ago

Last modified 9 years ago

Incorrect parsing in command line of MC

Reported by: AlexJ Owned by:
Priority: major Milestone:
Component: mc-core Version:
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:

Description (last modified by andrew_b) (diff)

MC - 4.7.0.2
compiled as i686 without subshell
Target OS: FreeBSD (tried on 6.x, 7.x, 8.0)
Run in SSH terminal session via PuTTy.
===========================================
Defect:

Attempt to execute command:

date "+%Y-%m-%d T %H:%M:%S"

in the command line of MidnightCommander return result:

# date "+%Y-%m-/root/.mc/cedit T %H:%M:qqq"
2010-03-/root/.mc/cedit T 08:03:qqq

I believe it was evaluated were as a menu script, since %d %S was evaluated as internal MC substitution.

Change History

comment:1 follow-up: ↓ 2 Changed 9 years ago by andrew_b

  • Version changed from version not selected to 4.7.1
  • Description modified (diff)

Two solutions can be implemented:

  • use %% instead of % to escape MC substitutions. In this case user have to write
    date "+%%Y-%%m-/root/.mc/cedit T %%H:%%M:qqq"
    
  • use some special symbol (@ for example) as a start symbol of command to disable all MC substitutions in that command:
    @date "+%Y-%m-/root/.mc/cedit T %H:%M:qqq"
    

comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 9 years ago by andrew_b

Replying to andrew_b:

Two solutions can be implemented:

  • use %% instead of % to escape MC substitutions. In this case user have to write
    date "+%Y-%m-%d T %H:%M:%S"
    

Actually, it's already implemented.

comment:3 in reply to: ↑ 2 Changed 9 years ago by andrew_b

Replying to andrew_b:

Actually, it's already implemented.

Sorry, I meant

date "+%%Y-%%m-%%d T %%H:%%M:%%S"

of course.

comment:4 Changed 9 years ago by andrew_b

  • Status changed from new to closed
  • Version 4.7.1 deleted
  • Resolution set to invalid
  • Milestone 4.7 deleted
Note: See TracTickets for help on using tickets.