diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d83f505a1..899b0c005 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,9 @@ Current Developments **Removed:** None -**Fixed:** None +**Fixed:** + +* Some minor zsh fixes for more platforms and setups. **Security:** None diff --git a/README.rst b/README.rst index 5dcaaab16..74cc05a0a 100644 --- a/README.rst +++ b/README.rst @@ -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. diff --git a/docs/index.rst b/docs/index.rst index cdee0ac09..490896bf4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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)]); @@ -277,7 +278,7 @@ open an issue on GitHub. Helpful Links ============= -* `Documentation `_ +* `Documentation `_ * `Mailing list `_ * `GitHub Repository `_ * `IRC: channel #xonsh on OFTC `_ diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 33dbc3de0..0e6a674da 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -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: diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 061abe2df..a7e32c1b8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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: diff --git a/xonsh/environ.py b/xonsh/environ.py index 9e8f7244e..e7b88871e 100644 --- a/xonsh/environ.py +++ b/xonsh/environ.py @@ -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."), diff --git a/xonsh/foreign_shells.py b/xonsh/foreign_shells.py index 48afdb441..77a918c09 100644 --- a/xonsh/foreign_shells.py +++ b/xonsh/foreign_shells.py @@ -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)