Since I got bored of having to type pct enter xxx each time,
I added an alias in .bashrc :
Now, when I press p, I am presented with a numbered sorted list of all running containers to choose from
I added an alias in .bashrc :
Bash:
alias p='PS3=" Which VM ? " ; select vm in $(pct list | grep running | sort -n | tr -s '\'' '\'' | cut -d " " -f1,3 | tr '\'' '\'' .) ; do pct enter ${vm:0:3} ; break ; done'