Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to show relative path in hg status

📅 2016-Feb-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ mercurial ⬩ 📚 Archive

By default, hg status shows modified files with path from the root of the working directory. Most of the time, I would like it show the paths relative to my current directory.

There is no --relative option and due to the few people who need this feature, Mercurial developers have said that such a flag will not be added.

However, applying an empty regular expression or pattern to the status command gets the job done:

$ hg status re:
$ hg status ""

Tried with: Mercurial 3.4 and Ubuntu 15.10

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧