Summary: | Konsole --tabs-from-file command behavior is opaque and hard to debug | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | skierpage <skierpage> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | dreibh, kdedev |
Priority: | NOR | ||
Version: | 21.12.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
skierpage
2021-05-12 02:20:02 UTC
I can confirm the unexpected and undocumented behaviour of Konsole (using konsole 21.12.3, under Kubuntu 22.04): Test tabs file contents: ----- title: test1;; command: date;; title: test2;; command: /bin/bash -c 'date && sleep 60';; title: test3;; command: /bin/bash -c "date && sleep 60";; title: test4;; command: /bin/bash -c \'date && sleep 60\';; title: test5;; command: /bin/bash -c \"date && sleep 60\";; title: test6;; command: /bin/bash -c \'date \&\& sleep 60\';; title: test7;; command: /bin/bash -c \"date \&\& sleep 60\";; title: test8;; command: date;; ----- It seems Konsole is not properly handling quotations (tried: " and '), which makes it impossible to write a more complex command call as call to a shell with the actual command line as parameter. test2 and test3 fail with: &&: -c: line 1: unexpected EOF while looking for matching `'' &&: -c: line 2: syntax error: unexpected end of file This may be a bug in the command parsing code? At least, the documentation (https://docs.kde.org/stable5/en/konsole/konsole/command-line-options.html) should clearly specify how to handle quotations. The "--hold" option is really useful for debugging --tabs-from-file issues. This should be clearly stated by the documentation! Trying to escape the quotation marks is not successful as well (test4 to test7). Further unexpected behaviour: ----- title: test12;; command: pwd;; title: test13;; command: ./access 172.19.255.101;; title: test14;; command: <ABSOLUTE-PATH-TO-THE-SCRIPTS-DIRECTORY>/access 172.19.255.101;; ----- test12 provides the current directory. In may test case, it contains a script "access". test13 fails: Warning: Could not find './access 172.19.255.101', starting '/bin/bash' instead. Please check your profile settings. /bin/bash: 172.19.255.101: No such file or directory Konsole seems to misinterpret './access 172.19.255.101' as the command name, i.e. not split between command and arguments. test14: This one works! Konsole seems to make a difference between absolute paths (test14) and relative paths (test13). |