Comment by escot
3 years ago
I use the following to edit contents of my clipboard:
pbpaste | vipe | pbcopy
Where vipe is a util for inserting your editor (vim) in the middle of a pipe. From: https://joeyh.name/code/moreutils/
3 years ago
I use the following to edit contents of my clipboard:
pbpaste | vipe | pbcopy
Where vipe is a util for inserting your editor (vim) in the middle of a pipe. From: https://joeyh.name/code/moreutils/
This is great utility I didn't know about! Thanks!
But do you know why it doesn't seem to work with the `pbfilter` function?
If I do directly `pbpaste | vipe | pbcopy`, then it opens vim and the clipboard text is pasted there. But if I run `pbfilter | vipe`, then vim opens with a blank buffer.
It seems that the number of args is 0 for some reason
I think you have to use `pbfilter vipe`, as the argument to pbfilter is inserted into the middle of the pipe.