Skip to content

Variables or command expansion automatically enclosed with single quotes #9376

Closed Answered by faho
krpors asked this question in Q&A
Discussion options

You must be logged in to vote

Fish only splits command substitutions on newlines

That's the important information here. That's your problem.

As you can see, the (find) command is eventually expanded to '"bla.pem" "bla.pem" ', which is incorrect input for the whiptail command (it is enclosed in single quotes).

It isn't. It's incorrect input for whiptail, but it's not "enclosed in single quotes".

What fish_trace here is showing is the equivalent of the command that would be executed. It's a fictional commandline.

Your argument here is as if you had used '"bla.pem" "bla.pem" ' on the commandline. What is actually passed, what whiptail receives, is therefore one string:

"bla.pem" "bla.pem" 

(with a trailing space)

What…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by krpors
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants