Merge branch 'master' into andor

This commit is contained in:
Anthony Scopatz 2016-02-10 03:20:43 -05:00
commit ce3361cf87
7 changed files with 27 additions and 12 deletions

View file

@ -15,7 +15,9 @@ Current Developments
**Removed:** None
**Fixed:** None
**Fixed:**
* Some minor zsh fixes for more platforms and setups.
**Security:** None

View file

@ -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
alike.
Please visit http://xonsh.org for more information.
Please visit http://xon.sh for more information.

View file

@ -32,6 +32,7 @@ the xonsh shell
"Sally sells csh and keeps xonsh to herself",
"Nice indeed. Everything's accounted for, except your old shell.",
"I wanna thank you for putting me back in my snail shell.",
"Crustaceanly Yours",
];
document.write(taglines[Math.floor(Math.random() * taglines.length)]);
</script>
@ -277,7 +278,7 @@ open an issue on GitHub.
Helpful Links
=============
* `Documentation <http://xonsh.org>`_
* `Documentation <http://xon.sh>`_
* `Mailing list <https://groups.google.com/forum/#!forum/xonsh>`_
* `GitHub Repository <https://github.com/scopatz/xonsh>`_
* `IRC: channel #xonsh on OFTC <http://www.oftc.net/>`_

View file

@ -23,7 +23,7 @@ Let's dive in!
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 are in a lesser terminal:

View file

@ -23,9 +23,9 @@ requirements:
- setproctitle
about:
home: http://xonsh.org/
home: http://xon.sh/
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
#app:

View file

@ -285,7 +285,7 @@ DEFAULT_DOCS = {
'FORMATTER_DICT': VarDocs(
'Dictionary containing variables to be used when formatting $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'),
'HISTCONTROL': VarDocs(
'A set of strings (comma-separated list in string form) of options '
@ -320,7 +320,7 @@ DEFAULT_DOCS = {
'PROMPT': VarDocs(
'The prompt text. May contain keyword arguments which are '
"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'),
'PROMPT_TOOLKIT_COLORS': VarDocs(
'This is a mapping of from color names to HTML color codes. Whenever '
@ -380,7 +380,7 @@ DEFAULT_DOCS = {
'TITLE': VarDocs(
'The title text for the window in which xonsh is running. Formatted '
"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'),
'VI_MODE': VarDocs(
"Flag to enable 'vi_mode' in the 'prompt_toolkit' shell."),

View file

@ -55,7 +55,11 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
file=${locfile#*"$sep"}
namefile="${namefile}\\"${name}\\":\\"${file//\\/\\\\}\\","
done <<< "$namelocfilestr"
namefile="${namefile%?}}"
if [[ "{" == "${namefile}" ]]; then
namefile="${namefile}}"
else
namefile="${namefile%?}}"
fi
echo $namefile
""".strip()
@ -67,7 +71,11 @@ for name in ${(ok)functions}; do
file=${loc[7,-1]}
namefile="${namefile}\\"${name}\\":\\"${(Q)file:A}\\","
done
namefile="${namefile%?}}"
if [[ "{" == "${namefile}" ]]; then
namefile="${namefile}}"
else
namefile="${namefile%?}}"
fi
echo ${namefile}
""".strip()
@ -75,24 +83,28 @@ DEFAULT_ENVCMDS = {
'bash': 'env',
'/bin/bash': 'env',
'zsh': 'env',
'/bin/zsh': 'env',
'/usr/bin/zsh': 'env',
}
DEFAULT_ALIASCMDS = {
'bash': 'alias',
'/bin/bash': 'alias',
'zsh': 'alias -L',
'/bin/zsh': 'alias -L',
'/usr/bin/zsh': 'alias -L',
}
DEFAULT_FUNCSCMDS = {
'bash': DEFAULT_BASH_FUNCSCMD,
'/bin/bash': DEFAULT_BASH_FUNCSCMD,
'zsh': DEFAULT_ZSH_FUNCSCMD,
'/bin/zsh': DEFAULT_ZSH_FUNCSCMD,
'/usr/bin/zsh': DEFAULT_ZSH_FUNCSCMD,
}
DEFAULT_SOURCERS = {
'bash': 'source',
'/bin/bash': 'source',
'zsh': 'source',
'/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')
envcmd = DEFAULT_ENVCMDS.get(shell, 'env') if envcmd is None else envcmd
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,
postcmd=postcmd, funcscmd=funcscmd).strip()
cmd.append(command)