SUMMARY *** KDialog displays escaped exclamation mark from terminal but not from a shell script. *** STEPS TO REPRODUCE 1. Enter a terminal command like this: kdialog --title "Conversion" --passivepopup "The file has been \"converted\" now\!" 2. Copy and paste this command into an empty executable shell script file, and run the script file from the terminal. OBSERVED RESULT 1. Terminal command results in this message text, as expected: The file has been "converted" now! 2. The script, however, results in this message text: The file has been "converted" now\! Additionally, the following terminal message appears: Unrecognized escape sequence \! EXPECTED RESULT Escaping the exclamation mark like other characters (e.g. double quotation mark) should work in script files as well as entering it directly in terminal. SOFTWARE/OS VERSIONS Operating System: KDE neon 5.25 KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6
This is not a KDialog issue. The difference in behaviour is due to using different shells. If you want to have bash behaviour in your shell script, run it in bash (not dash or whatever other shell you are using).
(In reply to Brad Hards from comment #1) > This is not a KDialog issue. > > The difference in behaviour is due to using different shells. If you want to > have bash behaviour in your shell script, run it in bash (not dash or > whatever other shell you are using). I use zsh but this behavior doesn't change even if it's named *.sh and its first line is like this: #!/usr/bin/env bash I ruled out that because KDialog --progressbar doesn't work with zsh but it works if I do as above. BTW, is the progress bar issue also zsh issue, and not KDialog issue? Thanks.