Add support for piping input to CodeEdit via CLI
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by locating the codeedit CLI entry point and its existing argument and file-opening handling. Reproduce the documented echo pipeline, then define how piped input is detected, represented as a temporary file, opened in CodeEdit, and cleaned up after editing; done means the example workflow works without disrupting normal file and folder arguments.
Written by the indexing model from the issue text.
Description
The codeedit CLI currently does not support receiving input via pipe (|). Introducing this feature would allow developers to seamlessly use the codeedit CLI to interact with the CodeEdit app, enabling workflows similar to those supported by other editors, such as Sublime Text's subl CLI, which supports piping input directly into the editor.
Use Case
Developers often use CLI tools to process text and may want to quickly edit the output in CodeEdit. For example:
echo "Sample text" | codeedit
With this feature, the codeedit CLI would behave similarly to subl from Sublime Text, opening a new tab or window in CodeEdit with the piped content for editing.
Benefits
- Expands the utility of the
codeeditCLI in developer workflows. - Positions CodeEdit as a competitive choice alongside editors like Sublime Text.
- Enables seamless integration with terminal-based pipelines.
Suggested Implementation
-
Input Detection:
ThecodeeditCLI should recognize when input is piped into it. -
Temporary File Handling:
Create a temporary file containing the piped input and open it in CodeEdit. -
Optional Flag:
Provide a--pipeflag to explicitly handle piped input, similar to howsubloperates.
Example
# Open piped text in CodeEdit
echo "Edit this text" | codeedit
# Example from Sublime Text for comparison
echo "Edit this text" | subl
Additional Considerations
- Temporary File Management: Ensure that temporary files are removed after the editing session ends.
- Efficient Input Handling: Handle large piped inputs efficiently to avoid performance bottlenecks.
- Custom Options: Allow configuring how piped input is managed (e.g., open in a new tab, new window, or append to an existing file).
By adopting a similar approach as subl, CodeEdit could provide a familiar and powerful experience for developers, while leveraging CodeEdit's unique features and interface.
- Dominant language
- Swift
- Stars
- 81
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeEditApp/CodeEditCLI
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
CodeEditApp/CodeEditCLI#28 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
CodeEditApp/CodeEditCLI#27 · 2 comments ·
-
Run codeedit as root Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
CodeEditApp/CodeEditCLI#26 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
CodeEditApp/CodeEditCLI#10 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in CodeEditApp/CodeEditCLI
Similar issues
-
task
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vsanthanam/JBird#429 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/Trio#1574 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
pending-maintainer-response pending-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area:build bug good first issue P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
uttrflow/uttrflow-swift#1412 ·