Now and/or shell expressions depend on shell plugin

This should fix issues with fish shell users as && and || are
not valid syntax, fish uses actual 'and' and 'or' programs.
Also updated to allow for fish backticks pushed quotes to subshell,
fish seems to handle spaces w/o them.
Lastly, removed encompassing subshell () for fish compatibility.
fixes #13199
This commit is contained in:
Brian Coca 2015-11-28 20:37:17 -08:00
parent cfeef81303
commit 26520442bd
2 changed files with 19 additions and 6 deletions

View file

@ -21,5 +21,12 @@ from ansible.plugins.shell.sh import ShellModule as ShModule
class ShellModule(ShModule):
_SHELL_AND = '; and'
_SHELL_OR = '; or'
_SHELL_SUB_LEFT = '('
_SHELL_SUB_RIGHT = ')'
_SHELL_GROUP_LEFT = ''
_SHELL_GROUP_RIGHT = ''
def env_prefix(self, **kwargs):
return 'env %s' % super(ShellModule, self).env_prefix(**kwargs)