Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable paste buffer to be changed before pasting #652

Closed
wants to merge 1 commit into from

Conversation

fdncred
Copy link
Collaborator

@fdncred fdncred commented Oct 31, 2023

This PR is just a thought starter. What would it be like to be able to paste data into reedline and have it manipulate that data?

In this example, I paste some shell script syntax and it's changed to nushell syntax.

Input from clipboard:

ENV_VAR1=var1
export ENV_VAR2=var2
line one \
line two \
line three \
line four

Output in reedline command buffer

(note the different env var syntax and the line continuation characters are removed)
image

I was thinking it would be cool to have some type of hook/callback where in nushell one could provide a custom command/script/module to manipulate data that is pasted. I'm not even sure that it's possible, but like I said, this is a thought starter.

I do not expect this PR to land. Just wanted to use it as an example.

@fdncred fdncred marked this pull request as draft October 31, 2023 12:06
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #652 (b7c9e75) into main (adc20cb) will decrease coverage by 0.68%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #652      +/-   ##
==========================================
- Coverage   49.76%   49.08%   -0.68%     
==========================================
  Files          41       42       +1     
  Lines        7827     7935     +108     
==========================================
  Hits         3895     3895              
- Misses       3932     4040     +108     
Files Coverage Δ
src/edit_mode/emacs.rs 88.03% <0.00%> (-5.61%) ⬇️

... and 3 files with indirect coverage changes

@fdncred
Copy link
Collaborator Author

fdncred commented Jan 8, 2024

This was fun and has potential but there doesn't seem to be anyone who's interested right now. So, I'll just cloes this for now.

@fdncred fdncred closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant