Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Sh failing in test_shells.TeshShells.text_rex_code_alias #663

Merged

Conversation

bfloch
Copy link
Contributor

@bfloch bfloch commented Jul 12, 2019

SH uses a different function convention then bash, namely: functioname() { ...; }
Compare http://www.skrenta.com/rt/man/sh.1.html

Currently using sh with rez-alias will result in an error like:

/tmp/rez_context_l7mlMa/rez-shell.sh: 5: /tmp/rez_context_l7mlMa/context.sh: Syntax error: "(" unexpected

I am not an expert on sh but I believe you can't/don't need to export the function afterwards.

Compatibility

  • Does not break compatibility
  • External Shell-Plugins should be careful if sub-classing Sh, since its alias implementation now differs from Bash

Tests passing

  • Windows 10.0.17134
    • cmd
  • Linux Ubuntu 18.04.2 LTS (WSL)
    • tcsh
    • sh
    • bash
    • csh

SH uses a different function convention then bash: ```functioname() { ... }```
@bfloch bfloch mentioned this pull request Jul 12, 2019
2 tasks
@bfloch bfloch changed the title Fixes Sh failing in test_shells.TeshShells.text_rex_code_alias [Fix] Sh failing in test_shells.TeshShells.text_rex_code_alias Jul 12, 2019
@nerdvegas nerdvegas merged commit 9c62cc3 into AcademySoftwareFoundation:master Jul 16, 2019
@nerdvegas
Copy link
Contributor

Merged, nice catch cheers

@bfloch bfloch deleted the feature/fix_sh_alias branch July 16, 2019 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants