-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Description
Currently all quotes in the arguments passed to gh fzf need to be escaped. For example, with gh, you can do:
gh issue list -S 'label:"known issue" milestone:"back burner"'However, you need to escape the quotes to view that list with gh fzf, which shouldn't be a requirement:
gh fzf issue -S \'label:\"known issue\" milestone:\"back burner\"\'This limitation is mentioned in the README's usage section, or else it would be a bug instead of an enhancement.
Acceptance Criteria
Arguments can be passed to gh fzf in the same format they are passed to gh, e.g. without escaping quotes.
Relevant Info
The quotes need to be escaped because the arguments are saved in the FZF_DEFAULT_COMMAND environment variable, which is how the list reloading and filtering works. This follows an example from fzf's readme.
I attempted to escape the quotes with printf:
escape() { printf "%q" "$@"; }This worked for simple use cases, but not ones where quotes are nested like the example in the description.
This is a shell quirk, so I will probably need to do a golang rewrite to fix the issue.