requires two clicks to select rectangle under particular circumstance
jmcantrell opened this issue · comments
This is not the real script that I'm using, but it's the only way that I can demonstrate this mysterious behavior.
I have the following in a script (say, test.sh
):
#!/usr/bin/env sh
{
echo 0,22 683x746
echo 683,22 683x373
echo 683,395 683x373
} | slurp -r
If you run this script and click a rectangle, it does what you would expect. It prints the selected rectangle.
Now, if this script is run as a subshell by doing something like:
echo $(./test.sh)
You will have to click twice before the rectangle will be printed.
This has worked in the past.
Following your directions as written, I can't reproduce. I wonder if maybe there is something else going on that is resulting in slurp being run twice. What shell are you using? Can you reproduce with a clean shell environment? (for example with the default .bashrc)
You're right. It does have something to do with my shell, but I haven't tracked it down yet. Closing this. Thank you.