Comments (6)
On Wed, May 04, 2016 at 02:50:51PM -0700, Aurélien Ooms wrote:
Yank does not exit directly when there's nothing in stdin. For example
echo | yank
waits for user input.
No news is good news, meaning if the input is empty or does not contain
any fields there will be no feedback. This is a common idiom among Unix
commands.
Moreover, in this example, if I press Enter I get
yank: write: Bad address
Which version are you using? Should be fixed in v0.6.3.
from yank.
v0.6.2
from yank.
On Thu, May 05, 2016 at 02:37:36AM -0700, Aurélien Ooms wrote:
v0.6.2
Could you try v0.6.3 or greater and see if it resolves the error?
from yank.
It doesn't crash in v0.6.4. However, I see the lack of (strong) distinction between echo | yank
and { sleep 839283; echo 'bla'; } | yank
as misleading for the user. The only difference I see in terminator is the blinking cursor.
from yank.
On Mon, May 09, 2016 at 06:32:23AM -0700, Aurélien Ooms wrote:
It doesn't crash in v0.6.4.
Glad to hear.
However, I see the lack of (strong) distinction between
echo | yank
and{ sleep 839283; echo 'bla'; } | yank
as misleading for the user. The only difference I see in terminator is the blinking cursor.
Your sleep example is tricky to detect since stdin remains open and will
until the echo command has finished. This would require one to use
poll/select with a timeout in order to detect "slow" input. If you want
to bypass yank when stdin is empty you could use wrapper command:
#/bin/sh
tmpfile=$(mktemp -t yank.XXXXXX)
trap "rm "$tmpfile"" EXIT
cat >"$tmpfile" # consume stdin
if [ -s "$tmpfile" ]
then
yank <"$tmpfile"
else
echo "stdin is empty, skipping yank..." 1>&2
exit 1
fi
from yank.
Ok
from yank.
Related Issues (20)
- 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
- Bug: newline as delimiter works as 2 delimiters: newline and 'n' HOT 1
- Bug: the results list gets cut to the number of lines that fit visible area 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.