Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC_EXT_BASENAME / %p is unset when viewed using mcview #4150

Closed
mc-butler opened this issue Nov 29, 2020 · 4 comments
Closed

MC_EXT_BASENAME / %p is unset when viewed using mcview #4150

mc-butler opened this issue Nov 29, 2020 · 4 comments
Assignees
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around ver: 4.8.25 Reproducible in version 4.8.25
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4150
Reporter egmont (@egmontkob)

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.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 31, 2021 at 6:44 UTC (comment 1)

  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.28
  • Status changed from new to accepted
  • Owner set to andrew_b

Branch: 4150_mcview_MC_EXT_BASENAME
[f1e2f0e]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 14, 2021 at 16:50 UTC (comment 2)

  • Branch state changed from on review to approved
  • Votes set to andrew_b

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 14, 2021 at 16:53 UTC (comment 3)

  • Branch state changed from approved to merged
  • Resolution set to fixed
  • Votes changed from andrew_b to committed-master
  • Status changed from accepted to testing

Merged to master: [53143b0].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 14, 2021 at 16:55 UTC (comment 4)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around ver: 4.8.25 Reproducible in version 4.8.25
Development

No branches or pull requests

2 participants