-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
fish 2.7.1
Ubuntu 18.04, GNOME terminal (xterm-256color)
third party extensions do not affect the issue
I would expect %last to be different for each sleep call
test.fish
><> ~/Desktop > cat test.fish 2:29:12pm
for i in (seq 1 5)
sleep 5 &
echo %last
endExpected
><> ~/Desktop > fish test.fish 2:29:14pm
30528
30529
30530
30531
30532Actual
><> ~/Desktop > fish test.fish 2:29:14pm
30528
30528
30528
30528
30528Using (jobs -lp) as a substitute for %last seems to work, although I would expect %last to work for this.
My use case for this is that I want to display an image which has some information on it, and I want to record the information within the image, then write that information to a file, close the image, and open the next one.
for image in (ls *.png)
eog $image &
set PID %last # substituting this with (jobs -lp) makes it work, although %last should work fine...
echo "What does the image say?"
read info
kill $PID
echo "$image - $info" >> my.file
endReactions are currently unavailable