> Can you confirm that the commands
> echo start
> sleep 1
> echo end
> have the same effect?
No, it works as it should. Same with true command.
It's just commands that read from the standard input behave that way. (pacman, apt, etc)
1. Create a file named ~/a.sh with content
read -p "Continue (y/n)?" choice
2. chmod +x ~/a.sh
3. emacs -q
4. M-x shell
5. echo start
~/a.sh
echo end
The result is
~ > echo start
~/a.sh
echo end
echo start
start
~ > ~/a.sh
Continue (y/n)?y
y
~ >