[Bug 6672] New: "bash_completion" doesn't work if "hg" is aliased with a space

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Mar 22 16:43:29 UTC 2022


https://bz.mercurial-scm.org/show_bug.cgi?id=6672

            Bug ID: 6672
           Summary: "bash_completion" doesn't work if "hg" is aliased with
                    a space
           Product: Mercurial
           Version: 6.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: mhentges at mozilla.com
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

To reproduce:

1. `source contrib/bash_completion`
2. `hg ver<TAB>` (works, shows "verify" and "version")
3. `alias hg=" hg"`
4. `hg ver<TAB>` (no results)

I have a use case where the `EDITOR` environment variable needs to be set, but
`hg`'s system `ui.editor` config should be prioritized over it - the workaround
that I've found is to do `alias hg="EDITOR= hg"`.

However, it appears to be the space in the alias that's tripping up the
completion script.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list