mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
Enable xonsh-cat for invocation directly from OS shell.
This commit is contained in:
parent
f321ebf041
commit
91f1962d28
3 changed files with 4 additions and 2 deletions
|
@ -21,6 +21,8 @@
|
|||
When multiple interpreters are in PATH, 'py' will choose the first one (usually in the virtual environment),
|
||||
but 'py -3' finds the system-wide one, apparently by design.
|
||||
|
||||
* For xonsh-cat, avoid parsing and processing first (0'th) argument when invoked directly from OS shell.
|
||||
|
||||
|
||||
**Security:**
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -379,7 +379,7 @@ def main():
|
|||
"pytest11": ["xonsh = xonsh.pytest_plugin"],
|
||||
"console_scripts": [
|
||||
"xonsh = xonsh.main:main",
|
||||
"xonsh-cat = xonsh.xorutils.cat",
|
||||
"xonsh-cat = xonsh.xoreutils.cat:cat_main",
|
||||
],
|
||||
}
|
||||
skw["cmdclass"]["develop"] = xdevelop
|
||||
|
|
|
@ -161,7 +161,7 @@ def cat_main(args=None):
|
|||
from xonsh.main import setup
|
||||
|
||||
setup()
|
||||
args = sys.argv if args is None else args
|
||||
args = sys.argv[1:] if args is None else args
|
||||
cat(args, sys.stdin, sys.stdout, sys.stderr)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue