Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • If you have arrays, which both bash and zsh do, that's a simpler way of solving this. ZEN=(--info --text "pure info" --title "get info"); zenity "${ZEN[@]}" Using single quotes in the variable definition would not work. Commented Jul 14, 2015 at 15:07
  • @Gilles what would not work with single quotes? Commented Jul 14, 2015 at 15:20
  • zenity $ZEN still would pass the arguments --info, --text, "pure, info", … just like what the asker tried. Oh, or did you mean this in combination with eval? That isn't clear. You should remove the bit about zsh, it's just confusing here. Commented Jul 14, 2015 at 15:25
  • I meant that he can use single quotes instead of escaping nested double-quotes - and this is only mentioned as a digression. Commented Jul 14, 2015 at 15:37