-
Notifications
You must be signed in to change notification settings - Fork 371
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Milestone
Description
π£ What Should be the Default Output Behavior of Code2Prompt ? π£
Current behavior
Right now, code2prompt
defaults to copying the generated prompt into the clipboard:
code2prompt .
β clipboardcode2prompt . -
β stdoutcode2prompt . -O file
β file
This is convenient for fast interactive workflows, but it is not standard Unix behavior (where stdout is usually the default).
Proposal A ( π ) : Keep current behavior (Clipboard-first)
π code2prompt .
β clipboard
π€ code2prompt . -
or code2prompt . -O -
β stdout
πΎ code2prompt . -O file
β file
β Pros:
- Keeps backward compatibility for users.
- Fastest workflow for copy/paste use cases.
β Cons:
- Non-standard for Unix tooling.
- Surprising for new users expecting stdout by default.
Vote with: π
Proposal B ( π ) : Switch to Unix-style behavior (Stdout-first)
π code2prompt .
β stdout
π code2prompt . -c
β clipboard
πΎ code2prompt . -O file
β file
β Pros:
- Standard Unix semantics.
- Plays better with piping/redirects.
β Cons:
- Breaking change for current users (default no longer clipboard).
- Requires re-training muscle memory.
Vote with: π
Context & Transition Plan
To smooth the migration, we will introduce a user config file (~/.c2prc
or ~/.c2pconfig
) that allows setting the default output mode #101 .
Example:
# ~/.c2pconfig
default_output = clipboard # or stdout or file
This way:
- We can safely switch the global default to Unix-style (stdout).
- Users who prefer clipboard as default can keep it by setting
default_output = clipboard
. - No one loses their preferred workflow.
- Make more sense by default to be able to chain
Code2Prompt
with other unix tools
Few examples :
code2prompt . | tee | wl-copy
code2prompt . > output.txt
code2prompt . | grep "public static void main()"
VOTE
Please vote with
- π (keep clipboard default)
- π (move to stdout default)
and feel free to share your thoughts below !
Pipboyguyperstarkse, 123vivekr, mufeedvh, markus1189, notdian and 3 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested