Pass argument starting with minus sign to shell command

bash, kde-plasma, linux

Solution

Try with:

kdialog --textinputbox 'Output:' -- '-0.1'

`--` means "end of options" and should work for all Qt (thus KDE) apps that use the standard argument functions for that framework.

Problem

I want to run the following (KDE specific) command with an argument (-0.1) that starts with '-' ``` kdialog --textinputbox 'Output:' '-0.1' ``` It is suposed to show a textbox with '-0.1' but the command gives ``` unknown option "-0.1" ``` while ``` kdialog --textinputbox 'Output:' '0.1' ``` works. Obviously the command tries to interpret 0.1 as an option. Is there a way to pass the argument "-0.1" to such commands? I tried passing it as variable which didn't work either!

Original source