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

FvwmPrompt quoting not consistent with the Read command. #662

Closed
domichel opened this issue Apr 12, 2022 · 4 comments · Fixed by #892
Closed

FvwmPrompt quoting not consistent with the Read command. #662

domichel opened this issue Apr 12, 2022 · 4 comments · Fixed by #892
Assignees
Labels
type:bug Something's broken!
Milestone

Comments

@domichel
Copy link
Contributor

$ fvwm3 --version
fvwm3 1.0.5 (1.0.4-123-g0fe58f0d-dirty)
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR, XRender, XCursor, XFT, NLS

A new ~amd64 gentoo installation.

$ uname -sp
Linux Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

Expected Behaviour

FvwmPront should use the same quoting than into the files read by the Read command.

If I write Exec urxvt -name "Some name" -e mc into a file and read it with Read thefile, it work fine and the resource of the urxvt window is "Some name".

If I write the same at the FvwmPrompt prompt, mc start but the resource of the urxvt window is truncated to "Some".
Into the log, I get urxvt: "name": malformed option.

In order to get the resource string I want, I must write Exec urxvt -name \"Some name\" -e mc

That is not consistent and can cause a lot of confusion for newcomers.

I get the same issue with Style options like Style "ALSA Mixer card $[infostore.SoundCard]" !Icon

  • Does the problem also happen with Fvwm2?
    No.

Include your configuration with this issue.
That's fvwm-crystal git with some work in progress in $[FVWM_USERDIR].

@domichel domichel added the type:bug Something's broken! label Apr 12, 2022
@ThomasAdam ThomasAdam added the relates:module Issue is in module code label Apr 12, 2022
@ThomasAdam ThomasAdam added this to the 1.0.5 milestone Apr 12, 2022
@ThomasAdam ThomasAdam moved this to To do in FVWM3 Sep 18, 2022
@ThomasAdam ThomasAdam added this to FVWM3 Sep 18, 2022
@ThomasAdam ThomasAdam removed this from the 1.0.5 milestone Sep 18, 2022
@siebenmann
Copy link

I will add my voice to this issue, and note that it prevents using FvwmPrompt as a direct replacement for FvwmConsole. I'm accustomed to doing things such as changing a menu definition in my .fvwm/config, opening a FvwmConsole, and pasting the new definition into FvwmConsole to refresh my live session without a full restart. The FvwmPrompt quoting issue means that this doesn't work.

@ThomasAdam ThomasAdam added this to the 1.0.8 milestone Aug 30, 2023
@ThomasAdam ThomasAdam moved this from To do to PRs in FVWM3 Aug 30, 2023
@ThomasAdam ThomasAdam removed the relates:module Issue is in module code label Aug 30, 2023
@ThomasAdam ThomasAdam self-assigned this Aug 30, 2023
ThomasAdam added a commit that referenced this issue Aug 30, 2023
When dealing with input entered into FvwmPrompt, using shell.c.Args meant
that the input had been parsed, which doesn't preserve quotes.  Hence,
the following:

    Exec exec xterm -T "Foo Bar" -e mc

Was parsed as this:

    Exec exec xterm -T Fooo Bar -e mc

Which is not the same thing.

It turns out that ishell preserves the argument list in RawArgs in its
context struct, so use this when parsing input from the user.

Fixes #662
@ThomasAdam
Copy link
Member

Hi,

Please have a look at the ta/gh-662 branch in this repo, which I believe should fix this issue.

@siebenmann
Copy link

In some quick testing for me, the change from this branch fixes this issue.

@ThomasAdam
Copy link
Member

Thanks, @siebenmann -- that's good enough for me. Will merge.

ThomasAdam added a commit that referenced this issue Aug 31, 2023
When dealing with input entered into FvwmPrompt, using shell.c.Args meant
that the input had been parsed, which doesn't preserve quotes.  Hence,
the following:

    Exec exec xterm -T "Foo Bar" -e mc

Was parsed as this:

    Exec exec xterm -T Fooo Bar -e mc

Which is not the same thing.

It turns out that ishell preserves the argument list in RawArgs in its
context struct, so use this when parsing input from the user.

Fixes #662
@github-project-automation github-project-automation bot moved this from PRs to Done in FVWM3 Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants