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

Incompatible shell commands #6

Open
sebsebmc opened this issue Jun 11, 2017 · 3 comments
Open

Incompatible shell commands #6

sebsebmc opened this issue Jun 11, 2017 · 3 comments

Comments

@sebsebmc
Copy link

When trying to run this through bash on windows I always get errors in the debug buffer coming from Kakoune trying to execute shell scripts.
There seems to be \bin\sh incompatible (non-POSIX compliant) syntax starting on this line.

I get the following errors after launching Kakoune and switching between insert and normal mode

shell stderr: <<<
/bin/sh: 2: [[: not found
/bin/sh: 4: Syntax error: redirection unexpected
>>>
@danr
Copy link
Owner

danr commented Jun 12, 2017

Thanks. There are other bashisms used at other places too, like ${var/pattern/replacement}, but now that there's an interest to change them I might get around to actually doing it :)

@sebsebmc
Copy link
Author

Can I ask what the replacements ${ //_/_u} here are doing?
I've managed to replace most of the bashisms but I'm not sure what the purpose of this replacement is.

@danr
Copy link
Owner

danr commented Jun 19, 2017

The goal is to replace all newlines with _n, so first underscores are replaced to _u.

This can be done using calling sed instead of bash substitutions.

I'll happily accept PRs that posixify the shell expansions!

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

No branches or pull requests

2 participants