Bug 506361 - --new-tab doesn't work if it's after -e
Summary: --new-tab doesn't work if it's after -e
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-29 19:18 UTC by Damglador
Modified: 2025-07-09 15:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damglador 2025-06-29 19:18:46 UTC
SUMMARY
I have «Run all Konsole windows in a single process» enabled and trying to execute something with «konsole -e <command> --new-tab» and it just opens a new Konsole window, but if I do «konsole --new-tab -e <command>» it opens a new tab in existing window as it should. At first I thought it didn't work at all, because I'm used to adding flags at the end and konsole --help doesn't mention that «--new-tab» should be at the begging. 

STEPS TO REPRODUCE
1. Do konsole -e sleep 20 --new-tab
2. Do konsole --new-tab -e sleep 20 

OBSERVED RESULT
konsole --new-tab -e sleep 20 opens a new window and instantly closes it. But if the command is not valid it falls back to shell and deosn't close the window
konsole -e sleep 20 --new-tab opens a new tab as it should

EXPECTED RESULT
--new-tab should work no matter the placement in the arguments

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.4-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 16 GiB of RAM (13.5 GiB usable)
Graphics Processor 1: AMD Radeon Graphics
Graphics Processor 2: NVIDIA GeForce RTX 3060 Laptop GPU

ADDITIONAL INFORMATION
Comment 1 starry don 2025-07-03 06:58:12 UTC
this  is my PC to execute 'konsole -h'  shows:

 -e <cmd>                   Command to execute. This option will catch all
                             following arguments, so use it as the last option.

so I think -e  argument should at the last.
and  my OS version:
KDE neon Unstable Edit
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.16.0
Qt Version:6.9.0
Kernel Version:6.11.0
Comment 2 Damglador 2025-07-09 15:29:07 UTC
Fair enough