mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
change to return self, add docs and CL
This commit is contained in:
parent
948dd832b5
commit
29b978b35c
3 changed files with 10 additions and 1 deletions
|
@ -12,6 +12,7 @@ Current Developments
|
|||
* Automatically enhance colors for readability in the default terminal (cmd.exe)
|
||||
on Windows. This functionality can be enabled/disabled with the
|
||||
$INTENSIFY_COLORS_ON_WIN environment variable.
|
||||
* Added ``Ellipsis`` lookup to ``__xonsh_env__`` to allow environment variable checks, e.g. ``'HOME' in ${...}``
|
||||
|
||||
|
||||
**Changed:**
|
||||
|
|
|
@ -197,6 +197,14 @@ examples in action:
|
|||
|
||||
Not bad, xonsh, not bad.
|
||||
|
||||
If you want to check if an environment variable is present in your current
|
||||
session (say, in your awesome new ``xonsh`` script) you can pass an Ellipsis to
|
||||
the ``${}`` operator:
|
||||
|
||||
.. code-block:: xonshcon
|
||||
|
||||
>>> 'HOME' in ${...}
|
||||
True
|
||||
|
||||
Running Commands
|
||||
==============================
|
||||
|
|
|
@ -587,7 +587,7 @@ class Env(MutableMapping):
|
|||
def __getitem__(self, key):
|
||||
if key is Ellipsis:
|
||||
val = builtins.__xonsh_env__
|
||||
return val
|
||||
return self
|
||||
m = self._arg_regex.match(key)
|
||||
if (m is not None) and (key not in self._d) and ('ARGS' in self._d):
|
||||
args = self._d['ARGS']
|
||||
|
|
Loading…
Add table
Reference in a new issue