mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
![]() I don't *think* this will have any side effects. When we build the ``$PROMPT``, we lazily check for ``git`` and ``hg`` binaries to see if we should generate a ``<branch>`` field. At the same time ``lazy_locate_binary`` doesn't return the path to a command if it detects that that command is an alias (since aliases won't have a path). In the case that ``git`` or ``hg`` is aliased (the specific case here was replacing ``git`` with ``hub``), ``lazy_locate_binary`` will return ``None`` because the command is an alias. This breaks the logic in the branch detection. We don't want to change the logic in the branch detection since there are many potential impacts on prompt generation speed, which makes for a bad user experience. So, this is a mildly ugly hack, but it's the best option I could come up with in order to preserve prompt speed and still keep the branch information available for this slightly weird edge case. I'm all ears to alternative solutions. |
||
---|---|---|
.. | ||
background_preditor_from_bin.rst | ||
elision_char_at_the_end_of_last.rst | ||
endrtn.rst | ||
event-transform-command.rst | ||
events-keywords.rst | ||
failover-script.rst | ||
glbf.rst | ||
gvim.rst | ||
hist-tss-fix.rst | ||
intrpt.rst | ||
jk.rst | ||
pybg.rst | ||
querycomp.rst | ||
source.rst | ||
strip_pygments.rst | ||
tabcomplete_for_click_apps.rst | ||
telnet.rst | ||
TEMPLATE.rst | ||
to2.rst | ||
vc_alias_fix.rst | ||
z.rst |