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

Fix shell scripts missing tags #386

Closed
wants to merge 2 commits into from

Conversation

Enzime
Copy link

@Enzime Enzime commented May 30, 2023

This PR changes it so that tags_from_path returns the tag from the shebang if the file is a shell script.

example.sh:

#!/bin/bash

tags_from_path("example")
Without this PR

{'file', 'text', 'executable', 'shell'}

With this PR

{'file', 'text', 'executable', 'shell', 'bash'}

@asottile
Copy link
Member

asottile commented May 30, 2023

this isn't correct

it should have been obvious from the tests and comments that what you're doing is wrong

@asottile asottile closed this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants