View Issue Details

IDProjectCategoryView StatusLast Update
0002845Far ManagerSpecial Symbolspublic2015-01-05 12:30
ReporterfarmanAssigned ToDrKnS 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSWindowsOS VersionXP SP3
Product Version 
Target VersionFixed in Version3.0 
Summary0002845: Wrong Handling of "exclamation marks" in Menu item "!?<title>?<init>!"
DescriptionFar Menu does not handle item "!?<title>?<init>!" correct if there is a file with "exclamation marks" (="!") in the name. No Problem while showing up the dialog. But on CommandLine there are errors.

Tested with clean FAR 3.0.4155
Steps To Reproduce1. Create a test label "Test exclamation marks in filenames" in Menu (F2)
2. Fill with:
@echo from Dialog "!?FName?(!.!)!" "!?Path?(!\!)!"
@echo from Panel FName="!.!" Path="!\!!"

3.Now Test on Dirname "!!!-Test1" and "!!-Test2"
"!!!-Test1" -> "!!!!-Test1-Test1"
"!!-Test2" -> "!-Test2"
Additional Information1. While running this test, another error raises up:
Running the above 2 lines via Menu on a filename destroys displaying of Panels. There's a problem using the "@".

2. And one more:
The described "!.\" (see help F1) doesn't work and leaves a point at the end of the last parameter.
menu test entry: echo winrar x "!.!" "!.\"
TagsNo tags attached.
Build4229

Activities

farman

2014-12-26 15:05

reporter   bugnote:0013361

This is still not fixed.
Another easier example. The following string is taken from F1 (Sepcial Symbols) and doesn't work in F2.

grep !?Search for:?! !?In:?*.*!|c:\far\Far.exe -v -

Shows a filename in the editield "Search for". But must be empty.

DrKnS

2014-12-27 16:37

administrator   bugnote:0013362

Initial problem is fixed in 4229.

> Running the above 2 lines via Menu on a filename destroys displaying of Panels. There's a problem using the "@".

Do not use @ here, in user menu its meaning is different from the bat/cmd files.

> The described "!.\" (see help F1) doesn't work and leaves a point at the end of the last parameter.

Use quotes, e. g. "!"\

> grep !?Search for:?! !?In:?*.*!|c:\far\Far.exe -v -
> Shows a filename in the editield "Search for". But must be empty.

It shows a most recent item from history, not a file name. It's also by design.

farman

2014-12-28 13:32

reporter   bugnote:0013363

Last edited: 2014-12-28 13:40

View 2 revisions

Thanx DrKnS. But I'm not really happy with that ;)

A. Initial Problem ("Steps To Reproduce")
1. Handling "!" seems to be fixed.
2. But if I cancel dialog with ESC it is still executed.

B. What is the meaning of a single "@" in "user menu"?
Using "@" is defined as "not to switch panels off before executing the associated program" (in "File associations"). It should not differ here and should be uniform in all shell assigned commands (like "associated commands", "user menu", "Apply command"). Else I can not guarantee that I (or other users) will come back in a year to tell about the same problem again...

C. "grep !?Search for:?! !?In:?*.*!|c:\far\Far.exe -v -"
Well, design is not so good here and has to be changed.
Using "<init>" in "!?<title>?<init>!" should offer 2 possibilities.
1. editfield with history (using "special symbol" $<history>$ as described in F1)
2. empty editfield with no history (default - Or: How do I get an empty field with no history?)

In F1 ("special symbols") there are some hints for the use of history. There should be added some examples for common history-names or a tip to look at "history.db" and the possibility to create a new (my own) history.

farman

2014-12-28 13:37

reporter   bugnote:0013364

I forgot:

Running the above (wrong) 2 lines with "@" via Menu on a filename destroys displaying of Panels. This shouldn't happen even if that's a wrong syntax.

DrKnS

2014-12-28 13:56

administrator   bugnote:0013365

> 2. But if I cancel dialog with ESC it is still executed.
You sure about that?

> It should not differ here and should be uniform in all shell assigned commands
It is uniform and it acts exactly like described in help - "not to switch panels off before executing the associated program".
Note, that makes sense only for programs which doesn't produce any output, e.g. notepad.exe. You are trying to use @ with echo, which definitely does, thus destroying your panels.

> 2. empty editfield with no history (default - Or: How do I get an empty field with no history?)
Use empty history name, e. g. $$

farman

2014-12-28 14:46

reporter   bugnote:0013366

> You sure about that?
Tried with last and clean nightly. Menu:
: 1test
    echo from Dialog "!?FName?(!.!)!" "!?Path?(!\!)!"
    echo from Panel FName="!.!" Path="!\!!"
: 2test
    grep !?Search for:?! !?In:?*.*!|c:\far\Far.exe -v -
    pause

> ... destroying your panels.
I got a bad, bad feeling with that kind of effect...

Can you please add hints for "empty history name" and the special usage of "@" in help?

DrKnS

2014-12-28 14:52

administrator   bugnote:0013367

> Tried with last and clean nightly. Menu:

Understood. Yes, it's expected - Esc cancels only the current command.

farman

2014-12-28 15:49

reporter   bugnote:0013368

This is a little off topic.
But is there a Hotkey to stop CtrlG (Apply Command)? Sometimes I have to stop excuting shortly after running CtrlG (i.e. wrong parameter in unrar command for 50 files). So that FAR doesn't run the command for the last 40 files.
Such a key would be very helpful.

DrKnS

2014-12-28 16:14

administrator   bugnote:0013370

Try Esc hotkey.

farman

2014-12-28 17:33

reporter   bugnote:0013371

I tried every key and kombination of keys in the past. But so simple... I should have known that. Can you please add this to F1?
Thanx.

Issue History

Date Modified Username Field Change
2014-10-24 19:03 farman New Issue
2014-12-26 15:05 farman Note Added: 0013361
2014-12-27 16:37 DrKnS Note Added: 0013362
2014-12-27 16:37 DrKnS Assigned To => DrKnS
2014-12-27 16:37 DrKnS Status new => assigned
2014-12-27 16:37 DrKnS Status assigned => feedback
2014-12-28 13:32 farman Note Added: 0013363
2014-12-28 13:32 farman Status feedback => assigned
2014-12-28 13:37 farman Note Added: 0013364
2014-12-28 13:40 farman Note Edited: 0013363 View Revisions
2014-12-28 13:56 DrKnS Note Added: 0013365
2014-12-28 14:46 farman Note Added: 0013366
2014-12-28 14:52 DrKnS Note Added: 0013367
2014-12-28 15:49 farman Note Added: 0013368
2014-12-28 16:14 DrKnS Note Added: 0013370
2014-12-28 17:33 farman Note Added: 0013371
2015-01-05 12:30 DrKnS Build => 4229
2015-01-05 12:30 DrKnS Status assigned => closed
2015-01-05 12:30 DrKnS Resolution open => fixed
2015-01-05 12:30 DrKnS Fixed in Version => 3.0