davatorium/rofi

[BUG] Stop quoting entries in history when running them

quyykk opened this issue · 5 comments

Rofi version (rofi -v)

afc65ac

Configuration

n/a

Theme

n/a

Timing report

No response

Launch command

rofi -show run

Step to reproduce

  1. Run say code /path/to/project (it's in history so gets autocompleted)
  2. The full entry is quoted, so it tries to run "code /path/to/project" which is a non-existent command

Expected behavior

I expect the entry to be run unquoted, respecting the arguments passed.

Actual behavior

Quotes the full history entry before running it, result in it trying to run a command that includes the arguments.

Additional information

I saw that this was intentional, so maybe the solution here would be to make the command handling smarter by only quoting the entry if the quoted entry is an actual command in PATH, and if not retain the old behavior (idk if this is feasible, was just an idea).

Note: Another related bug is that, if the command with spaces is not in the history (so no code /path/to/project in history), then the command doesn't get quoted and runs. This seems like an inconsistency that should probably be fixed too.

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version

I don't understand how this is a duplicate. That issue is about having duplicate entries in your history, and this issue is about how commands with arguments are quoted when run (making them fail, because the arguments are not part of the command name).

Where did it say it is duplicate, It should be fixed by the fix in that issue.

Oh sorry. But I'm on afc65ac which should include the commit that fixes the linked issue, so it seems like this is still a problem?

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.