You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that ydotool always adds an implicit \n at the end when reading from a file using -f flag. For example, let's say I have a file with the following
cd /home/user/
ls
rm file.txt
I would assume that ydotool will type and execute the first and second commands (cd and ls) but only type the last one (rm) and I should press the final enter to execute it. However, this is not the case and ydotool behaves as if the file is like this (with a trailing new line after the rm
cd /home/user/
ls
rm file.txt
Another point worth mentioning is that passing the text I want to type via CLI does not show the same behavior, as in, new lines are types only if they're explicitly there,
Regards,
The text was updated successfully, but these errors were encountered:
I also want to mention that the below command works correctly but unfortunately it completely omits newlines, so it cannot be used for multiline files,
echo -n "ls" | ydotool type -f - && sleep 5
Edit: The sleep 5 is to observer ydotool behavior and not confuse it with program exit,
Hello,
I have noticed that ydotool always adds an implicit \n at the end when reading from a file using
-f
flag. For example, let's say I have a file with the followingI would assume that ydotool will type and execute the first and second commands (cd and ls) but only type the last one (rm) and I should press the final enter to execute it. However, this is not the case and ydotool behaves as if the file is like this (with a trailing new line after the
rm
Another point worth mentioning is that passing the text I want to type via CLI does not show the same behavior, as in, new lines are types only if they're explicitly there,
Regards,
The text was updated successfully, but these errors were encountered: