Giter Site home page Giter Site logo

Comments (7)

w0rp avatar w0rp commented on July 22, 2024

The first of your two examples looks correct to me. There is an open pull request #55 which deals with discovering the right shell to use bashed on the shebang line at the top. That should probably improve things, but I'm not quite certain about the implementation yet. I would like to avoid the systemlist call if at all possible. Take a look at that pull request.

The default shell is bash when the shell cannot be detected otherwise.

from ale.

w0rp avatar w0rp commented on July 22, 2024

Check out the branch shell-detection. I tried to improve shell detection without making a system call. I realised that there are only so many shell programs we can support with a -n flag, so I can list all of them, and the name of the shell program to run must come basically at the end of the string. You could symlink to the shell programs or something but... just don't do that.

from ale.

KabbAmine avatar KabbAmine commented on July 22, 2024

9d52d96 looks good to me, but you still can improve it:

  • First check if there is a shebang, and if not ...
  • check the environment variable $SHELL (fnamemodify($SHELL, ':t')), and if it returns an empty string...
  • fallback to g:ale_linters_sh_shell_default_shell

from ale.

w0rp avatar w0rp commented on July 22, 2024

What if I change the default value of g:ale_linters_sh_shell_default_shell to fnamemodify($SHELL, ':t') or 'bash' if that string is empty? Then you will be able to override the value of $SHELL if you want to.

from ale.

KabbAmine avatar KabbAmine commented on July 22, 2024

Good idea, that should cover all the cases.

from ale.

w0rp avatar w0rp commented on July 22, 2024

I have pushed that now, and another commit which documents the option.

from ale.

KabbAmine avatar KabbAmine commented on July 22, 2024

Great.

For the issue here, its again related to the used local (Mine is french).
A PR is on the way.

from ale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.