Add F7 copy command functionality to CommandScreen#1793
Add F7 copy command functionality to CommandScreen#1793j-a-c-k-goes wants to merge 2 commits intohtop-dev:mainfrom
Conversation
Consolidates vector sorting functions as mentioned in issue htop-dev#1785. Implements Highlander Rule by providing single sorting function. Features: - Context-aware comparison functions for sorting logic - Hybrid algo: insertion sort <=16 elements, quicksort >16 elements - Backward compatible. Existing functions unchanged - NULL-safe context handling Performance benefits: - Algo selection based on array sizing - Faster inserts on large arrays than w/ pure insertion sort - Standard 16 element thresh for algo switching This address issue htop-dev#1785 w/o breaking existing code. Future commits can migrate call sites to use Vector_sort gradually (if merged)
Implements copy-to-clipboard feature for process command lines as requested in issue htop-dev#1788. Implementation use F7 in CommandScreen to copy the full command line to system clipboard. Features: - F7 key binding follows htop function key pattern - Linux/macOS/BSD via xclip/xsel/pbcopy support - Full command line copying w. all args - Operator feedback via status message - Error handling for missing clipboard tools Implementation: - Added CommandScreen_copyCommand() function - Added CommandScreen_onKey() handler for F7 - Updated function bar to show F7 Copy option - Platform-specific clipboard commands via system() - No external dependencies needed F7 key binding addresses issue htop-dev#1788 w/o breaking existing functionality. It is now convenient to copy process command lines for debugging, documentation, or reuse purposes. Signed-off-by: [_ack] <[jack@flnpb.com]>
|
|
This PR has several issues, and one of them being down-voting of a good comment listing a few of the things that are wrong with this PR. Let's start:
And given that |
|
Another thing. No offense, but why does the test program |
COPY_COMMAND_PR.md
Add F7 copy command functionality to CommandScreen
Implements copy-to-clipboard feature for process command lines
as requested in issue #1788. Implementation uses F7 in CommandScreen
to copy the full command line to system clipboard.
Features:
Implementation:
F7 key binding addresses issue #1788 w/o breaking existing functionality.
It is now convenient to copy process command lines for debugging,
documentation, or reuse purposes.
Signed-off-by: [_ack] <[jack@flnpb.com]>