Home > database >  How to feed a variable into a zenity --text-info box?
How to feed a variable into a zenity --text-info box?

Time:02-15

For some reason the zenity --text box won't display the text string. Likely because it is too long. I'm hoping a --text-info box will do the trick.

Is there anyway to get the --filename= param to take a string input rather than a file input?

Example:

help_zenity_output(){
    zenity --text-info --width 777 --title 'Hotstrings -> Command' \
    --filename=<<<"$1"
    #--text="$1"
}

CodePudding user response:

No need to use the --filename parameter. Just drop it. Zenity reads the content from stdin.

help_zenity_output(){
  zenity --text-info --width 777 --title 'Hotstrings -> Command' <<< "$1"
}
  • Related