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: preserve quotes, etc #892

Merged
merged 1 commit into from
Aug 31, 2023
Merged

FvwmPrompt: preserve quotes, etc #892

merged 1 commit into from
Aug 31, 2023

Conversation

ThomasAdam
Copy link
Member

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

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 ThomasAdam added this to the 1.0.8 milestone Aug 30, 2023
@ThomasAdam ThomasAdam self-assigned this Aug 30, 2023
@ThomasAdam ThomasAdam marked this pull request as ready for review August 31, 2023 08:48
@ThomasAdam ThomasAdam added the type:bug Something's broken! label Aug 31, 2023
@ThomasAdam ThomasAdam merged commit 2eb6692 into main Aug 31, 2023
4 checks passed
@ThomasAdam ThomasAdam deleted the ta/gh-662 branch August 31, 2023 19:04
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 this pull request may close these issues.

FvwmPrompt quoting not consistent with the Read command.
1 participant