mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 00:41:00 +01:00
Merge pull request #1748 from laerus/andorcomplet
auto quote completion paths that contain 'and', 'or'
This commit is contained in:
commit
09e66f631f
2 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
**Fixed:**
|
**Fixed:**
|
||||||
|
|
||||||
|
* Auto quote path completions if path contains 'and' or 'or'
|
||||||
|
|
||||||
* Completion now works on subcommands after pipe, ``&&``, ``||`` and so on.
|
* Completion now works on subcommands after pipe, ``&&``, ``||`` and so on.
|
||||||
|
|
||||||
**Security:** None
|
**Security:** None
|
|
@ -11,9 +11,10 @@ from xonsh.completers.tools import get_filter_function
|
||||||
|
|
||||||
@xl.lazyobject
|
@xl.lazyobject
|
||||||
def CHARACTERS_NEED_QUOTES():
|
def CHARACTERS_NEED_QUOTES():
|
||||||
cnq = ' `\t\r\n${}*()"\',?&'
|
cnq = [' ', '`', '\t', '\r', '\n', '$', '{', '}', ','
|
||||||
|
'*', '(', ')', '"', "'", '?', '&', 'and', 'or']
|
||||||
if xp.ON_WINDOWS:
|
if xp.ON_WINDOWS:
|
||||||
cnq += '%'
|
cnq.append('%')
|
||||||
return cnq
|
return cnq
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue