Truncate long commands from middle

Long commands that don't fit in the terminal width now show the beginning and end separated by ellipsis (e.g., `docker run --rm -it -v /home/u...:22.04 bash -c`) instead of being cut off at the end, making them easier to identify in narrow terminals.