Xonsh introduces the !n and !! aliases to execute previous commands.
In bash, those history expansions are among the first to execute making it possible to use them inside of expressions.
Here is an example of command that execute the previous command with elevated privilege in bash and that fail in xonsh : sudo !!
It would be nice to make history expansion happen early in xonsh too.
Thanks for reporting @matletix!
sudo !! is now available using the bashisms xontrib. Just put xontrib load bashisms in your xonshrc and you should be good to go.
Most helpful comment
sudo !!is now available using thebashismsxontrib. Just putxontrib load bashismsin yourxonshrcand you should be good to go.