mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
More completer example clarification
This commit is contained in:
parent
4b26928973
commit
fef6743f4b
1 changed files with 3 additions and 3 deletions
|
@ -92,10 +92,10 @@ xonsh actually uses, in the ``xonsh.completers`` module.
|
|||
|
||||
def unbeliever_completer(prefix, line, begidx, endidx, ctx):
|
||||
'''
|
||||
Replaces "lou carcolh" with "snail" if tab is pressed after typing
|
||||
"lou" and when typing "carcolh"
|
||||
Replaces "lou carcolh" with "snail" if tab is pressed after at least
|
||||
typing the "lou " part.
|
||||
'''
|
||||
if 'carcolh'.startswith(prefix) or 'lou' in line[:begidx].split()[-1:]:
|
||||
if 'carcolh'.startswith(prefix) and 'lou' in line[:begidx].split()[-1:]:
|
||||
return ({'snail'}, len('lou ') + len(prefix))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue