mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Merge branch 'master' into andor
This commit is contained in:
commit
ce3361cf87
7 changed files with 27 additions and 12 deletions
|
@ -15,7 +15,9 @@ Current Developments
|
||||||
|
|
||||||
**Removed:** None
|
**Removed:** None
|
||||||
|
|
||||||
**Fixed:** None
|
**Fixed:**
|
||||||
|
|
||||||
|
* Some minor zsh fixes for more platforms and setups.
|
||||||
|
|
||||||
**Security:** None
|
**Security:** None
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@ The language is a superset of Python 3.4+ with additional shell primitives.
|
||||||
xonsh (pronounced *conch*) is meant for the daily use of experts and novices
|
xonsh (pronounced *conch*) is meant for the daily use of experts and novices
|
||||||
alike.
|
alike.
|
||||||
|
|
||||||
Please visit http://xonsh.org for more information.
|
Please visit http://xon.sh for more information.
|
||||||
|
|
|
@ -32,6 +32,7 @@ the xonsh shell
|
||||||
"Sally sells csh and keeps xonsh to herself",
|
"Sally sells csh and keeps xonsh to herself",
|
||||||
"Nice indeed. Everything's accounted for, except your old shell.",
|
"Nice indeed. Everything's accounted for, except your old shell.",
|
||||||
"I wanna thank you for putting me back in my snail shell.",
|
"I wanna thank you for putting me back in my snail shell.",
|
||||||
|
"Crustaceanly Yours",
|
||||||
];
|
];
|
||||||
document.write(taglines[Math.floor(Math.random() * taglines.length)]);
|
document.write(taglines[Math.floor(Math.random() * taglines.length)]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -277,7 +278,7 @@ open an issue on GitHub.
|
||||||
Helpful Links
|
Helpful Links
|
||||||
=============
|
=============
|
||||||
|
|
||||||
* `Documentation <http://xonsh.org>`_
|
* `Documentation <http://xon.sh>`_
|
||||||
* `Mailing list <https://groups.google.com/forum/#!forum/xonsh>`_
|
* `Mailing list <https://groups.google.com/forum/#!forum/xonsh>`_
|
||||||
* `GitHub Repository <https://github.com/scopatz/xonsh>`_
|
* `GitHub Repository <https://github.com/scopatz/xonsh>`_
|
||||||
* `IRC: channel #xonsh on OFTC <http://www.oftc.net/>`_
|
* `IRC: channel #xonsh on OFTC <http://www.oftc.net/>`_
|
||||||
|
|
|
@ -23,7 +23,7 @@ Let's dive in!
|
||||||
|
|
||||||
Starting xonsh
|
Starting xonsh
|
||||||
========================
|
========================
|
||||||
Assuming you have successfully installed xonsh (see http://xonsh.org),
|
Assuming you have successfully installed xonsh (see http://xon.sh),
|
||||||
you can start up the xonsh interpreter via the ``xonsh`` command. Suppose
|
you can start up the xonsh interpreter via the ``xonsh`` command. Suppose
|
||||||
you are in a lesser terminal:
|
you are in a lesser terminal:
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@ requirements:
|
||||||
- setproctitle
|
- setproctitle
|
||||||
|
|
||||||
about:
|
about:
|
||||||
home: http://xonsh.org/
|
home: http://xon.sh/
|
||||||
license: BSD
|
license: BSD
|
||||||
summary: xonsh is a Python-ish, BASHwards-compatible shell.
|
summary: xonsh is a Python-ish, BASHwards-facing shell.
|
||||||
|
|
||||||
# Removed temporarily until this is better support by the Anaconda launcher
|
# Removed temporarily until this is better support by the Anaconda launcher
|
||||||
#app:
|
#app:
|
||||||
|
|
|
@ -285,7 +285,7 @@ DEFAULT_DOCS = {
|
||||||
'FORMATTER_DICT': VarDocs(
|
'FORMATTER_DICT': VarDocs(
|
||||||
'Dictionary containing variables to be used when formatting $PROMPT '
|
'Dictionary containing variables to be used when formatting $PROMPT '
|
||||||
"and $TITLE. See 'Customizing the Prompt' "
|
"and $TITLE. See 'Customizing the Prompt' "
|
||||||
'http://xonsh.org/tutorial.html#customizing-the-prompt',
|
'http://xon.sh/tutorial.html#customizing-the-prompt',
|
||||||
configurable=False, default='xonsh.environ.FORMATTER_DICT'),
|
configurable=False, default='xonsh.environ.FORMATTER_DICT'),
|
||||||
'HISTCONTROL': VarDocs(
|
'HISTCONTROL': VarDocs(
|
||||||
'A set of strings (comma-separated list in string form) of options '
|
'A set of strings (comma-separated list in string form) of options '
|
||||||
|
@ -320,7 +320,7 @@ DEFAULT_DOCS = {
|
||||||
'PROMPT': VarDocs(
|
'PROMPT': VarDocs(
|
||||||
'The prompt text. May contain keyword arguments which are '
|
'The prompt text. May contain keyword arguments which are '
|
||||||
"auto-formatted, see 'Customizing the Prompt' at "
|
"auto-formatted, see 'Customizing the Prompt' at "
|
||||||
'http://xonsh.org/tutorial.html#customizing-the-prompt.',
|
'http://xon.sh/tutorial.html#customizing-the-prompt.',
|
||||||
default='xonsh.environ.DEFAULT_PROMPT'),
|
default='xonsh.environ.DEFAULT_PROMPT'),
|
||||||
'PROMPT_TOOLKIT_COLORS': VarDocs(
|
'PROMPT_TOOLKIT_COLORS': VarDocs(
|
||||||
'This is a mapping of from color names to HTML color codes. Whenever '
|
'This is a mapping of from color names to HTML color codes. Whenever '
|
||||||
|
@ -380,7 +380,7 @@ DEFAULT_DOCS = {
|
||||||
'TITLE': VarDocs(
|
'TITLE': VarDocs(
|
||||||
'The title text for the window in which xonsh is running. Formatted '
|
'The title text for the window in which xonsh is running. Formatted '
|
||||||
"in the same manner as $PROMPT, see 'Customizing the Prompt' "
|
"in the same manner as $PROMPT, see 'Customizing the Prompt' "
|
||||||
'http://xonsh.org/tutorial.html#customizing-the-prompt.',
|
'http://xon.sh/tutorial.html#customizing-the-prompt.',
|
||||||
default='xonsh.environ.DEFAULT_TITLE'),
|
default='xonsh.environ.DEFAULT_TITLE'),
|
||||||
'VI_MODE': VarDocs(
|
'VI_MODE': VarDocs(
|
||||||
"Flag to enable 'vi_mode' in the 'prompt_toolkit' shell."),
|
"Flag to enable 'vi_mode' in the 'prompt_toolkit' shell."),
|
||||||
|
|
|
@ -55,7 +55,11 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
file=${locfile#*"$sep"}
|
file=${locfile#*"$sep"}
|
||||||
namefile="${namefile}\\"${name}\\":\\"${file//\\/\\\\}\\","
|
namefile="${namefile}\\"${name}\\":\\"${file//\\/\\\\}\\","
|
||||||
done <<< "$namelocfilestr"
|
done <<< "$namelocfilestr"
|
||||||
namefile="${namefile%?}}"
|
if [[ "{" == "${namefile}" ]]; then
|
||||||
|
namefile="${namefile}}"
|
||||||
|
else
|
||||||
|
namefile="${namefile%?}}"
|
||||||
|
fi
|
||||||
echo $namefile
|
echo $namefile
|
||||||
""".strip()
|
""".strip()
|
||||||
|
|
||||||
|
@ -67,7 +71,11 @@ for name in ${(ok)functions}; do
|
||||||
file=${loc[7,-1]}
|
file=${loc[7,-1]}
|
||||||
namefile="${namefile}\\"${name}\\":\\"${(Q)file:A}\\","
|
namefile="${namefile}\\"${name}\\":\\"${(Q)file:A}\\","
|
||||||
done
|
done
|
||||||
namefile="${namefile%?}}"
|
if [[ "{" == "${namefile}" ]]; then
|
||||||
|
namefile="${namefile}}"
|
||||||
|
else
|
||||||
|
namefile="${namefile%?}}"
|
||||||
|
fi
|
||||||
echo ${namefile}
|
echo ${namefile}
|
||||||
""".strip()
|
""".strip()
|
||||||
|
|
||||||
|
@ -75,24 +83,28 @@ DEFAULT_ENVCMDS = {
|
||||||
'bash': 'env',
|
'bash': 'env',
|
||||||
'/bin/bash': 'env',
|
'/bin/bash': 'env',
|
||||||
'zsh': 'env',
|
'zsh': 'env',
|
||||||
|
'/bin/zsh': 'env',
|
||||||
'/usr/bin/zsh': 'env',
|
'/usr/bin/zsh': 'env',
|
||||||
}
|
}
|
||||||
DEFAULT_ALIASCMDS = {
|
DEFAULT_ALIASCMDS = {
|
||||||
'bash': 'alias',
|
'bash': 'alias',
|
||||||
'/bin/bash': 'alias',
|
'/bin/bash': 'alias',
|
||||||
'zsh': 'alias -L',
|
'zsh': 'alias -L',
|
||||||
|
'/bin/zsh': 'alias -L',
|
||||||
'/usr/bin/zsh': 'alias -L',
|
'/usr/bin/zsh': 'alias -L',
|
||||||
}
|
}
|
||||||
DEFAULT_FUNCSCMDS = {
|
DEFAULT_FUNCSCMDS = {
|
||||||
'bash': DEFAULT_BASH_FUNCSCMD,
|
'bash': DEFAULT_BASH_FUNCSCMD,
|
||||||
'/bin/bash': DEFAULT_BASH_FUNCSCMD,
|
'/bin/bash': DEFAULT_BASH_FUNCSCMD,
|
||||||
'zsh': DEFAULT_ZSH_FUNCSCMD,
|
'zsh': DEFAULT_ZSH_FUNCSCMD,
|
||||||
|
'/bin/zsh': DEFAULT_ZSH_FUNCSCMD,
|
||||||
'/usr/bin/zsh': DEFAULT_ZSH_FUNCSCMD,
|
'/usr/bin/zsh': DEFAULT_ZSH_FUNCSCMD,
|
||||||
}
|
}
|
||||||
DEFAULT_SOURCERS = {
|
DEFAULT_SOURCERS = {
|
||||||
'bash': 'source',
|
'bash': 'source',
|
||||||
'/bin/bash': 'source',
|
'/bin/bash': 'source',
|
||||||
'zsh': 'source',
|
'zsh': 'source',
|
||||||
|
'/bin/zsh': 'source',
|
||||||
'/usr/bin/zsh': 'source',
|
'/usr/bin/zsh': 'source',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +170,7 @@ def foreign_shell_data(shell, interactive=True, login=False, envcmd=None,
|
||||||
cmd.append('-c')
|
cmd.append('-c')
|
||||||
envcmd = DEFAULT_ENVCMDS.get(shell, 'env') if envcmd is None else envcmd
|
envcmd = DEFAULT_ENVCMDS.get(shell, 'env') if envcmd is None else envcmd
|
||||||
aliascmd = DEFAULT_ALIASCMDS.get(shell, 'alias') if aliascmd is None else aliascmd
|
aliascmd = DEFAULT_ALIASCMDS.get(shell, 'alias') if aliascmd is None else aliascmd
|
||||||
funcscmd = DEFAULT_FUNCSCMDS.get(shell, '') if funcscmd is None else funcscmd
|
funcscmd = DEFAULT_FUNCSCMDS.get(shell, 'echo {}') if funcscmd is None else funcscmd
|
||||||
command = COMMAND.format(envcmd=envcmd, aliascmd=aliascmd, prevcmd=prevcmd,
|
command = COMMAND.format(envcmd=envcmd, aliascmd=aliascmd, prevcmd=prevcmd,
|
||||||
postcmd=postcmd, funcscmd=funcscmd).strip()
|
postcmd=postcmd, funcscmd=funcscmd).strip()
|
||||||
cmd.append(command)
|
cmd.append(command)
|
||||||
|
|
Loading…
Add table
Reference in a new issue