https://bz.mercurial-scm.org/show_bug.cgi?id=6447
Bug ID: 6447 Summary: Mercurial needs to export it's call options when doing a shell bang Product: Mercurial Version: default branch Hardware: PC OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: c.ozan...@gmail.com CC: mercurial-devel@mercurial-scm.org Python Version: --- When running an application / shell script from an hg shell bang the following shell variables are exported and available: HG - the path to hg HG_ARGS - the name of the alias that performed the shell bang If I create a shell script that calls hg, there is no current method of passing the calling options. For example: I create the following script: #! /usr/bin/env bash hg log -T $1 exit $? I then add the following alias to my ~/.hgrc file named slog in ~/bin/: [alias] slog = ! ~/bin/slog now if I type the following: hg slog status I get the logs using the status template However, if I type the following: hg --color off --hidden slog status I get logging with color set to default (not the option) and it does not show hidden changesets. It would be nice if mercurial where to also export its call options for scripts / applications to use. Possibly a comma separated list as HG_FULLARGS. For example: hg --color off --hidden slog status would make available the following additional exported content: HG_FULLARGS=-"-color,off,--hidden" this could then be parsed by a shell script and used when calling hg. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel