Ticket #4150 (new defect)

Opened 10 months ago

MC_EXT_BASENAME / %p is unset when viewed using mcview

Reported by: egmont Owned by:
Priority: minor Milestone: Future Releases
Component: mcview Version: 4.8.25
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

I'm trying to write a filter for certain type of files, to be executed when I view the file in mc.

I've added an entry something like this to mc.ext:

regex/\.myextension$
        View=%view{ascii} myfilter %p

The filename is always correctly passed if I use %f in the command line, or check for the MC_EXT_FILENAME environment variable (as mentioned at the top of mc.ext). I can either start "mc" and press F3 on the file, or I can start "mcview filename.myextension", it doesn't matter, they both work.

If I pass %p, or check for its corresponding MC_EXT_BASENAME environment variable, and then I start up "mc" and press F3 on the file, it works again.

However, if I try to pass %p or check for the MC_EXT_BASENAME env var, and then I start "mcview filename.myextension", these command line parameter and environment variable are missing.

%p / MC_EXT_BASENAME (and all the other macros / env vars which I haven't checked) should still work in this case.

Note: See TracTickets for help on using tickets.