id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4150	MC_EXT_BASENAME / %p is unset when viewed using mcview	egmont	andrew_b	"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."	defect	closed	minor	4.8.28	mcview	4.8.25	fixed					merged	committed-master
