question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Per-file shell override?

See original GitHub issue

I have a file that works in multiple shells, and is sourced not executed, so I don’t want to put a shebang directive in it (also, a “shell” directive would imply it only works on one shell, and I’m not aware of how i can tell shellcheck i want to check multiple shells). I usually lint it on the command line with shellcheck -s sh path/to/file && shellcheck -s dash path/to/file && shellcheck -s bash path/to/file etc.

It would be great if:

  1. i could provide a filename in the extension settings, and override the shell (ie, the -s value) for it
  2. i could provide multiples and have the extension warn me about the union of all the warnings

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
felipecrscommented, Jun 4, 2022

My concern is about the cleanability of the code. I have the impression that such a new feature would not be simple and could add a burden in terms of maintainability (and we lack maintainers).

But I would be happy to be wrong and review any PRs. 😉

Therefore, I will keep it open for a while.

0reactions
ljharbcommented, Jun 4, 2022

I totally agree that would be ideal, but given that that one’s 6 years old, it doesn’t seem likely to be implemented - in which case it’d be pretty helpful to have it here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change Profiles Shell settings in Terminal on Mac
To change these settings in the Terminal app on your Mac, choose Terminal > Settings, click Profiles, select a profile, then click Shell....
Read more >
How to override my profile - The UNIX and Linux Forums
I would like to override the default profile which is loaded when the system starts or When ... The UNIX and Linux Forums....
Read more >
Linux .profile overrides other bash commands
Best-practices: Don't use a login shell unless you need one. When you pass the -l argument to bash, you're telling it to behave...
Read more >
Allow configurable shell profiles - AWS Systems Manager
To restrict a user's ability to modify commands or scripts entered in their shell profile, we recommend the following: Create a customized Session-type...
Read more >
Customizing $HOME/.profile
The values set in $HOME/.profile can override those in /etc/profile. Because $HOME/.profile is the z/OS shell ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found