Comments (3)
I've set
alias yank='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | sed "s/\x0f//g" | yank'
which solves the problem, kind of , but the output is not colored anymore
from yank.
Thanks for the report. However commands that is part of a chain of pipes
usually don't output ANSI escape sequence colors unless you explicitly
tell them to. Like the grep(1) --color=always
option. If you still
want colors in the input sent to yank you could simply strip the yanked
field after. Notice yank command won't be invoked since the output is
piped, therefore the last call to xsel(1) is needed which of course
could be any command of your choice.
alias yank='yank | sed -r "s/\x1B[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | sed "s/\x0f//g" | xsel'
On Tue, Feb 23, 2016 at 08:26:48AM -0800, netei wrote:
I've set
alias yank='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | sed "s/\x0f//g" | yank'
which solves the problem, kind of , but the output is not colored anymore
Reply to this email directly or view it on GitHub:
#26 (comment)
:wq
from yank.
I have some custom commands that always output colors, that's why I needed this.
Your trick to put the pipes after the yank is great, I didn't know that yank would output to stdout when it is piped.
from yank.
Related Issues (20)
- Add h,j,k,l bindings HOT 4
- vi-like keybindings HOT 6
- yanking without input HOT 6
- Fedora RPM's HOT 3
- Stripping debug info HOT 5
- support no-interaction mode HOT 5
- yank only sees the first page HOT 2
- How to use yank over ssh? HOT 6
- Crashes when using -g with -l or -d HOT 1
- How to yank to clipboard? HOT 1
- suggestion: delimiter command HOT 1
- Why doesn't `... -- <command>` work? HOT 1
- Skip fields using hotkey like ctrl-arrow or ctrl-end, ctrl-home keys? HOT 1
- Setting YANKCMD to "xsel --clipboard" HOT 2
- Copy all output? HOT 3
- Install failed on Ubuntu 20.04.2 HOT 2
- jump across filenames with specific extension HOT 2
- Yank not using xsel on Ubuntu 20/22? HOT 4
- `--select-1` option similar to fzf HOT 3
- Make yank not depend on `xsel` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yank.