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

Makefile language injection determined by SHELL variable #11875

Open
jakubkaczor opened this issue Oct 12, 2024 · 0 comments
Open

Makefile language injection determined by SHELL variable #11875

jakubkaczor opened this issue Oct 12, 2024 · 0 comments
Labels
C-enhancement Category: Improvements

Comments

@jakubkaczor
Copy link

jakubkaczor commented Oct 12, 2024

Currently, in makefiles, the language injected in place of recipes is Bash. It would be nice if the language was determined by the make variable SHELL that defaults to /bin/sh1. For example, the recipe in

SHELL := /usr/bin/env nu

test:
	echo "hello" o+e> test.txt

should be highlighted as in

#!/usr/bin/env nu
echo "hello" o+e> test.txt

A similar behavior is already achieved in the case of Just2.

Footnotes

  1. https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

  2. https://github.com/helix-editor/helix/blob/a7651f5bf027ec98645d571ab05a685d97e1b772/runtime/queries/just/injections.scm#L25

@jakubkaczor jakubkaczor added the C-enhancement Category: Improvements label Oct 12, 2024
@jakubkaczor jakubkaczor changed the title Make file language injection determined by SHELL variable Makefile language injection determined by SHELL variable Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

1 participant