https://bugs.kde.org/show_bug.cgi?id=527603

            Bug ID: 527603
           Summary: Copy action is disabled with empty selection despite
                    semantic shell integration supporting last command
                    output
    Classification: Applications
           Product: konsole
      Version First 26.08.2
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: copy-paste
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

The Copy action (Ctrl+Shift+C) is disabled when no text is selected, even when
semantic shell integration is active and the previous command's output is
available.

According to the official Konsole documentation, copying with an empty
selection should copy the current input line if non-empty, or the last
command's output otherwise.

This documented behavior does not work in Konsole 26.08.2.

STEPS TO REPRODUCE

Open Konsole with semantic shell integration enabled (OSC 133).

Execute the following command:

printf 'one\ntwo\nthree\n'

Wait for the next shell prompt. Leave the input line empty.

Ensure no text is selected.

Press Ctrl+Shift+C.

Check the system clipboard using wl-paste or another application.

Open Edit → Copy in the Konsole menu.

OBSERVED RESULT

Ctrl+Shift+C does not copy the previous command's output.

The system clipboard remains unchanged.

Edit → Copy is disabled when no text is selected.

Selecting any text enables the Copy action.

EXPECTED RESULT

When semantic shell integration is active and the current input line is empty,
Ctrl+Shift+C should copy the complete output of the most recently executed
command without requiring manual text selection.

For the example above, the clipboard should contain:

one
two
three

The Copy action should remain available when semantic command output is
available, even if no text is selected.

ADDITIONAL INFORMATION

Semantic shell integration itself is working correctly:

OSC 133 markers are recognized by Konsole.

Holding Ctrl and triple-clicking on the output of a command correctly selects
the entire output block.

Semantic visual indicators for commands work.

The issue was also observed when testing with Bash, so it does not appear
specific to Zsh.

The problem appears to be related to the Copy action's enabled state or its
handling of empty selections, rather than missing semantic command boundaries.

The official documentation explicitly describes copying the last command output
when the selection is empty and there is no current input:

https://docs.kde.org/stable_kf6/en/konsole/konsole/semantic-shell-integration.html

A related user discussion describes the same desired workflow:

https://discuss.kde.org/t/select-copy-output-of-previous-command-in-konsole/36086

WHY THIS MATTERS

Copying command output without including the prompt or user input is especially
useful when sharing terminal results with development tools, AI coding
assistants, and issue trackers.

Konsole already has the semantic information required to identify command
output. Exposing this through the standard Copy shortcut would significantly
improve terminal usability without requiring additional shell scripts or manual
text selection.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to