Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias Assign NameStore Call AttributeLoad Str attr Assign NameStore Call AttributeLoad Str attr Assign NameStore Call AttributeLoad Str attr Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Str Str NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd CompareIs NameLoad NameLoad Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad TryFinally body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr NameLoad body If UnaryOpNot NameLoad body Raise Return TupleLoad Dict Dict finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return Dict Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore ListComp Call AttributeLoad NameLoad attr Str Num comprehension NameStore Call AttributeLoad NameLoad attr CompareIn Str NameLoad Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return Dict Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore ListComp Call AttributeLoad NameLoad attr Str Num comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd Call AttributeLoad NameLoad attr Str CompareIn Str NameLoad Assign NameStore Dict For TupleStore NameStore NameStore NameLoad body TryExcept body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr Str Str If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Num Str CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return Dict Assign NameStore Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Return Dict Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Continue If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore IfExp CompareIs NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpOr UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str body Return NameLoad Return BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr Str NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn Str NameLoad body Return TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad NameLoad decorator_list decorator_list Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr If UnaryOpNot CompareLtE NameLoad NameLoad body Assign NameStore Str Raise Call NameLoad Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str IfExp CompareIs SubscriptLoad NameLoad Index Str NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str IfExp CompareIs SubscriptLoad NameLoad Index Str NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str If BoolOpAnd CompareIn Str NameLoad UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index Str If BoolOpAnd CompareIn Str NameLoad UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad ListComp TupleLoad Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad ListComp TupleLoad Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad orelse Raise Call NameLoad Str Assign SubscriptStore NameLoad Index Str NameLoad If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str IfExp CompareIs SubscriptLoad NameLoad Index Str NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str IfExp CompareIs SubscriptLoad NameLoad Index Str NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list Assign NameStore TupleLoad Dict Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str orelse If CompareIsNot NameLoad NameLoad body Pass orelse If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse If NameLoad body Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A Tools to help interface with foreign shells, such as Bash. N/A os N/A re N/A json N/A shlex N/A builtins N/A subprocess warnings warn functools lru_cache tempfile NamedTemporaryFile collections MutableMapping Mapping Sequence xonsh.tools to_bool ensure_string N/A COMMAND N/A N/A 
{prevcmd}
echo __XONSH_ENV_BEG__
{envcmd}
echo __XONSH_ENV_END__
echo __XONSH_ALIAS_BEG__
{aliascmd}
echo __XONSH_ALIAS_END__
echo __XONSH_FUNCS_BEG__
{funcscmd}
echo __XONSH_FUNCS_END__
{postcmd}
 strip N/A DEFAULT_BASH_FUNCSCMD N/A N/A 
# get function names from declare
declstr=$(declare -F)
read -r -a decls <<< $declstr
funcnames=""
for((n=0;n<${#decls[@]};n++)); do
  if (( $(($n % 3 )) == 2 )); then
    # get every 3rd entry
    funcnames="$funcnames ${decls[$n]}"
  fi
done

# get functions locations: funcname lineno filename
shopt -s extdebug
namelocfilestr=$(declare -F $funcnames)
shopt -u extdebug

# print just names and files as JSON object
read -r -a namelocfile <<< $namelocfilestr
sep=" "
namefile="{"
while IFS='' read -r line || [[ -n "$line" ]]; do
  name=${line%%"$sep"*}
  locfile=${line#*"$sep"}
  loc=${locfile%%"$sep"*}
  file=${locfile#*"$sep"}
  namefile="${namefile}\"${name}\":\"${file//\/\\}\","
done <<< "$namelocfilestr"
if [[ "{" == "${namefile}" ]]; then
  namefile="${namefile}}"
else
  namefile="${namefile%?}}"
fi
echo $namefile
 strip N/A DEFAULT_ZSH_FUNCSCMD N/A N/A 
namefile="{"
for name in ${(ok)functions}; do
  loc=$(whence -v $name)
  loc=${(z)loc}
  file=${loc[7,-1]}
  namefile="${namefile}\"${name}\":\"${(Q)file:A}\","
done
if [[ "{" == "${namefile}" ]]; then
  namefile="${namefile}}"
else
  namefile="${namefile%?}}"
fi
echo ${namefile}
 strip N/A DEFAULT_ENVCMDS N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd env env env env env set N/A DEFAULT_ALIASCMDS N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd alias alias alias -L alias -L alias -L N/A DEFAULT_FUNCSCMDS N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd DEFAULT_BASH_FUNCSCMD DEFAULT_BASH_FUNCSCMD DEFAULT_ZSH_FUNCSCMD DEFAULT_ZSH_FUNCSCMD DEFAULT_ZSH_FUNCSCMD N/A DEFAULT_SOURCERS N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd source source source source source call N/A DEFAULT_TMPFILE_EXT N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd .sh .sh .zsh .zsh .zsh .bat N/A DEFAULT_RUNCMD N/A bash /bin/bash zsh /bin/zsh /usr/bin/zsh cmd -c -c -c -c -c /C foreign_shell_data N/A N/A shell interactive login envcmd aliascmd extra_args currenv safe prevcmd postcmd funcscmd sourcer use_tmpfile tmpfile_ext runcmd N/A True False None None N/A None True None None False None None N/A N/A Extracts data from a foreign (non-xonsh) shells. Currently this gets
    the environment, aliases, and functions but may be extended in the future.

    Parameters
    ----------
    shell : str
        The name of the shell, such as 'bash' or '/bin/sh'.
    interactive : bool, optional
        Whether the shell should be run in interactive mode.
    login : bool, optional
        Whether the shell should be a login shell.
    envcmd : str or None, optional
        The command to generate environment output with.
    aliascmd : str or None, optional
        The command to generate alias output with.
    extra_args : tuple of str, optional
        Addtional command line options to pass into the shell.
    currenv : tuple of items or None, optional
        Manual override for the current environment.
    safe : bool, optional
        Flag for whether or not to safely handle exceptions and other errors.
    prevcmd : str, optional
        A command to run in the shell before anything else, useful for
        sourcing and other commands that may require environment recovery.
    postcmd : str, optional
        A command to run after everything else, useful for cleaning up any
        damage that the prevcmd may have caused.
    funcscmd : str or None, optional
        This is a command or script that can be used to determine the names
        and locations of any functions that are native to the foreign shell.
        This command should print *only* a JSON object that maps
        function names to the filenames where the functions are defined.
        If this is None, then a default script will attempted to be looked
        up based on the shell name. Callable wrappers for these functions
        will be returned in the aliases dictionary.
    sourcer : str or None, optional
        How to source a foreign shell file for purposes of calling functions
        in that shell. If this is None, a default value will attempt to be
        looked up based on the shell name.
    use_tmpfile : bool, optional
        This specifies if the commands are written to a tmp file or just
        parsed directly to the shell
    tmpfile_ext : str or None, optional
        If tmpfile is True this sets specifies the extension used.

    Returns
    -------
    env : dict
        Dictionary of shell's environment
    aliases : dict
        Dictionary of shell's alaiases, this includes foreign function
        wrappers.
     N/A cmd N/A shell N/A N/A N/A cmd extend extra_args N/A interactive N/A N/A N/A N/A cmd append -i N/A login N/A N/A N/A N/A cmd append -l N/A envcmd N/A N/A envcmd None N/A N/A DEFAULT_ENVCMDS get shell env envcmd N/A aliascmd N/A N/A aliascmd None N/A N/A DEFAULT_ALIASCMDS get shell alias aliascmd N/A funcscmd N/A N/A funcscmd None N/A N/A DEFAULT_FUNCSCMDS get shell echo {} funcscmd N/A tmpfile_ext N/A N/A tmpfile_ext None N/A N/A DEFAULT_TMPFILE_EXT get shell sh tmpfile_ext N/A runcmd N/A N/A runcmd None N/A N/A DEFAULT_RUNCMD get shell -c runcmd N/A command N/A N/A N/A N/A COMMAND format envcmd envcmd aliascmd aliascmd prevcmd prevcmd postcmd postcmd funcscmd funcscmd strip N/A N/A N/A cmd append runcmd N/A N/A use_tmpfile N/A N/A N/A N/A cmd append command N/A N/A tmpfile N/A NamedTemporaryFile suffix tmpfile_ext delete False N/A N/A N/A tmpfile write N/A N/A command encode utf8 N/A N/A N/A tmpfile close N/A N/A N/A cmd append N/A tmpfile name N/A N/A N/A currenv None N/A hasattr builtins __xonsh_env__ N/A N/A currenv N/A N/A N/A builtins __xonsh_env__ detype N/A N/A N/A currenv None N/A N/A currenv N/A dict currenv N/A N/A N/A N/A N/A s N/A N/A subprocess check_output cmd stderr N/A subprocess PIPE env currenv start_new_session True universal_newlines True N/A N/A N/A N/A N/A subprocess CalledProcessError FileNotFoundError N/A N/A N/A safe N/A N/A N/A N/A N/A N/A N/A N/A use_tmpfile N/A N/A N/A N/A os remove N/A tmpfile name N/A env N/A parse_env s N/A aliases N/A parse_aliases s N/A funcs N/A parse_funcs s shell shell sourcer sourcer N/A N/A N/A aliases update funcs N/A N/A env aliases N/A N/A lru_cache N/A ENV_RE N/A N/A re compile __XONSH_ENV_BEG__
(.*)__XONSH_ENV_END__ flags N/A re DOTALL parse_env N/A N/A s N/A N/A N/A Parses the environment portion of string into a dict. N/A m N/A N/A ENV_RE search s N/A N/A m None N/A N/A N/A N/A g1 N/A N/A m group 1 N/A items N/A N/A N/A line split = 1 N/A line N/A N/A g1 splitlines N/A = line N/A env N/A dict items N/A env N/A N/A ALIAS_RE N/A N/A re compile __XONSH_ALIAS_BEG__
(.*)__XONSH_ALIAS_END__ flags N/A re DOTALL parse_aliases N/A N/A s N/A N/A N/A Parses the aliases portion of string into a dict. N/A m N/A N/A ALIAS_RE search s N/A N/A m None N/A N/A N/A N/A g1 N/A N/A m group 1 N/A items N/A N/A N/A line split = 1 N/A line N/A N/A g1 splitlines N/A N/A N/A line startswith alias  N/A = line N/A aliases N/A N/A N/A key value items N/A N/A N/A N/A key N/A key N/A 6 N/A value N/A N/A value replace '\'' ' N/A N/A N/A N/A value N/A 0 ' N/A N/A value N/A -1 ' N/A N/A value N/A value N/A 1 -1 N/A value N/A N/A shlex split value N/A N/A N/A ValueError N/A exc N/A N/A N/A warn N/A N/A could not parse alias "{0}": {1!r} format key exc RuntimeWarning N/A N/A N/A aliases N/A key value N/A aliases N/A N/A FUNCS_RE N/A N/A re compile __XONSH_FUNCS_BEG__
(.+)
__XONSH_FUNCS_END__ flags N/A re DOTALL parse_funcs N/A N/A s shell sourcer N/A None N/A N/A Parses the funcs portion of a string into a dict of callable foreign
    function wrappers.
     N/A m N/A N/A FUNCS_RE search s N/A N/A m None N/A N/A N/A N/A g1 N/A N/A m group 1 N/A N/A N/A namefiles N/A N/A json loads N/A N/A g1 strip N/A N/A N/A N/A N/A json decoder JSONDecodeError N/A exc N/A N/A msg {0!r}

could not parse {1} functions:
  s  = {2!r}
  g1 = {3!r}

Note: you may be seeing this error if you use zsh with prezto. Prezto overwrites GNU coreutils functions (like echo) with its own zsh functions. Please try disabling prezto. N/A N/A warn N/A N/A msg format exc shell s g1 RuntimeWarning N/A N/A N/A sourcer N/A N/A sourcer None N/A N/A DEFAULT_SOURCERS get shell source sourcer N/A funcs N/A N/A N/A funcname filename N/A N/A namefiles items N/A N/A N/A N/A funcname startswith _ N/A N/A N/A N/A N/A N/A N/A os path isabs filename N/A N/A filename N/A N/A N/A os path abspath filename N/A wrapper N/A ForeignShellFunctionAlias name funcname shell shell sourcer sourcer filename filename N/A N/A funcs N/A funcname wrapper N/A funcs N/A ForeignShellFunctionAlias N/A object N/A N/A This class is responsible for calling foreign shell functions as if
    they were aliases. This does not currently support taking stdin.
     N/A INPUT {sourcer} "{filename}"
{funcname} {args}
 __init__ N/A N/A self name shell filename sourcer N/A None N/A N/A 
        Parameters
        ----------
        name : str
            function name
        shell : str
            Name or path to shell
        filename : str
            Where the function is defined, path to source.
        sourcer : str or None, optional
            Command to source foreing files with.
         N/A sourcer N/A N/A sourcer None N/A N/A DEFAULT_SOURCERS get shell source sourcer N/A N/A self name name N/A N/A self shell shell N/A N/A self filename filename N/A N/A self sourcer sourcer N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A N/A hasattr other name N/A N/A hasattr other shell N/A N/A hasattr other filename N/A N/A hasattr other sourcer N/A N/A NotImplemented N/A N/A N/A N/A self name N/A other name N/A N/A self shell N/A other shell N/A N/A self filename N/A other filename N/A N/A self sourcer N/A other sourcer N/A __call__ N/A N/A self args stdin N/A None N/A N/A N/A args streaming N/A N/A self _is_streaming args N/A input N/A N/A N/A self INPUT format sourcer N/A self sourcer filename N/A self filename funcname N/A self name args N/A N/A join args N/A cmd N/A N/A self shell -c input N/A env N/A builtins __xonsh_env__ N/A denv N/A N/A env detype N/A streaming N/A N/A N/A N/A subprocess check_call cmd env denv N/A out None N/A N/A out N/A N/A subprocess check_output cmd env denv stderr N/A subprocess STDOUT N/A out N/A N/A out decode encoding N/A N/A env get XONSH_ENCODING errors N/A N/A env get XONSH_ENCODING_ERRORS N/A out N/A N/A out replace N/A out N/A _is_streaming N/A N/A self args N/A N/A N/A Test and modify args if --xonsh-stream is present. N/A N/A --xonsh-stream args N/A N/A N/A args False N/A args N/A list args N/A N/A N/A args remove --xonsh-stream N/A N/A args True N/A N/A N/A VALID_SHELL_PARAMS N/A frozenset N/A shell interactive login envcmd aliascmd extra_args currenv safe prevcmd postcmd funcscmd sourcer ensure_shell N/A N/A shell N/A N/A N/A Ensures that a mapping follows the shell specification. N/A N/A N/A isinstance shell MutableMapping N/A N/A shell N/A dict shell N/A shell_keys N/A set N/A N/A shell keys N/A N/A N/A shell_keys VALID_SHELL_PARAMS N/A N/A msg unknown shell keys: {0} N/A N/A KeyError N/A N/A msg format N/A shell_keys VALID_SHELL_PARAMS N/A N/A shell N/A shell N/A ensure_string N/A shell N/A shell N/A N/A interactive shell_keys N/A N/A N/A shell N/A interactive N/A to_bool N/A shell N/A interactive N/A N/A login shell_keys N/A N/A N/A shell N/A login N/A to_bool N/A shell N/A login N/A N/A envcmd shell_keys N/A N/A N/A shell N/A envcmd N/A N/A N/A shell N/A envcmd None None N/A ensure_string N/A shell N/A envcmd N/A N/A aliascmd shell_keys N/A N/A N/A shell N/A aliascmd N/A N/A N/A shell N/A aliascmd None None N/A ensure_string N/A shell N/A aliascmd N/A N/A N/A extra_args shell_keys N/A N/A isinstance N/A shell N/A extra_args tuple N/A N/A N/A shell N/A extra_args N/A tuple N/A map ensure_string N/A shell N/A extra_args N/A N/A N/A currenv shell_keys N/A N/A isinstance N/A shell N/A currenv tuple N/A N/A ce N/A shell N/A currenv N/A N/A isinstance ce Mapping N/A N/A ce N/A tuple N/A N/A N/A ensure_string k v N/A N/A k v N/A N/A ce items N/A N/A N/A isinstance ce Sequence N/A N/A ce N/A tuple N/A N/A N/A ensure_string k v N/A N/A k v ce N/A N/A N/A RuntimeError unrecognized type for currenv N/A N/A shell N/A currenv ce N/A N/A safe shell_keys N/A N/A N/A shell N/A safe N/A to_bool N/A shell N/A safe N/A N/A prevcmd shell_keys N/A N/A N/A shell N/A prevcmd N/A ensure_string N/A shell N/A prevcmd N/A N/A postcmd shell_keys N/A N/A N/A shell N/A postcmd N/A ensure_string N/A shell N/A postcmd N/A N/A funcscmd shell_keys N/A N/A N/A shell N/A funcscmd N/A N/A N/A shell N/A funcscmd None None N/A ensure_string N/A shell N/A funcscmd N/A N/A sourcer shell_keys N/A N/A N/A shell N/A sourcer N/A N/A N/A shell N/A sourcer None None N/A ensure_string N/A shell N/A sourcer N/A shell N/A N/A DEFAULT_SHELLS N/A N/A shell bash _get_shells N/A N/A shells config issue_warning N/A None None True N/A N/A N/A N/A shells None N/A config None N/A N/A N/A RuntimeError Only one of shells and config may be non-None. N/A N/A N/A shells None N/A N/A N/A N/A N/A config None N/A N/A config N/A N/A N/A builtins __xonsh_env__ get XONSHCONFIG N/A N/A N/A N/A os path isfile config N/A N/A N/A open config r f N/A N/A conf N/A N/A json load f N/A shells N/A N/A conf get foreign_shells DEFAULT_SHELLS N/A N/A issue_warning N/A N/A msg could not find xonsh config file ($XONSHCONFIG) at {0!r} N/A N/A warn N/A N/A msg format config RuntimeWarning N/A shells DEFAULT_SHELLS N/A shells N/A load_foreign_envs N/A N/A shells config issue_warning N/A None None True N/A N/A Loads environments from foreign shells.

    Parameters
    ----------
    shells : sequence of dicts, optional
        An iterable of dicts that can be passed into foreign_shell_data() as
        keyword arguments. Not compatible with config not being None.
    config : str of None, optional
        Path to the static config file. Not compatible with shell not being None.
        If both shell and config is None, then it will be read from the
        $XONSHCONFIG environment variable.
    issue_warning : bool, optional
        Issues warnings if config file cannot be found.

    Returns
    -------
    env : dict
        A dictionary of the merged environments.
     N/A shells N/A _get_shells shells shells config config issue_warning issue_warning N/A env N/A N/A shell shells N/A N/A shell N/A ensure_shell shell N/A N/A shenv _ N/A foreign_shell_data shell N/A N/A N/A env update shenv N/A env N/A load_foreign_aliases N/A N/A shells config issue_warning N/A None None True N/A N/A Loads aliases from foreign shells.

    Parameters
    ----------
    shells : sequence of dicts, optional
        An iterable of dicts that can be passed into foreign_shell_data() as
        keyword arguments. Not compatible with config not being None.
    config : str of None, optional
        Path to the static config file. Not compatible with shell not being None.
        If both shell and config is None, then it will be read from the
        $XONSHCONFIG environment variable.
    issue_warning : bool, optional
        Issues warnings if config file cannot be found.

    Returns
    -------
    aliases : dict
        A dictionary of the merged aliases.
     N/A shells N/A _get_shells shells shells config config issue_warning issue_warning N/A aliases N/A N/A shell shells N/A N/A shell N/A ensure_shell shell N/A N/A _ shaliases N/A foreign_shell_data shell N/A N/A N/A aliases update shaliases N/A aliases N/A