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

Detect nix-shell shebangs #51

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ncfavier
Copy link

@ncfavier ncfavier commented Jun 8, 2023

Fixes #10

To do:

The implementation of shellwords here should be correct, but doesn't match the one Nix currently uses. That will be fixed by NixOS/nix#8470.

Parse the interpreter from the arguments on subsequent shebang lines.
@Ma27
Copy link
Collaborator

Ma27 commented Jul 29, 2023

@ncfavier do you need assistance with this? Or, where exactly is this stuck? The neovim issue is closed for instance.
Re upstreaming this into mainline vim: I'm fine with integrating this here first considering that this is the de-facto package for Nix users using vim[1].
Re exposing the filetype detection logic: is there anything to be done in upstream vim?

[1] That said, considering the complexity of the code, tests are a hard requirement for me :)

@ncfavier
Copy link
Author

Thanks for taking an interest in this, I kind of lost interest myself.

The main thing is "expose and use vim's interpreter → filetype conversion logic". I brought this up in the vim issue linked above but nothing has happened yet. It should be straightforward to submit a patch. This code should be moved into a separate function and exported.

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.

Detect nix-shell shebangs
2 participants