Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions identify/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
'nimble': {'text', 'nimble'},
'nix': {'text', 'nix'},
'njk': {'text', 'nunjucks'},
'nu': {'text', 'nushell'},
'otf': {'binary', 'otf'},
'p12': {'binary', 'p12'},
'pas': {'text', 'pascal'},
Expand Down
2 changes: 2 additions & 0 deletions identify/interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
'ksh': {'shell', 'ksh'},
'node': {'javascript'},
'nodejs': {'javascript'},
'nu': {'nushell'},
'nushell': {'nushell'},
'perl': {'perl'},
'php': {'php'},
'php7': {'php', 'php7'},
Expand Down
4 changes: 4 additions & 0 deletions tests/identify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_all_tags_contains_each_type():
assert 'dockerfile' in identify.ALL_TAGS # by file convention
assert 'python3' in identify.ALL_TAGS # by shebang
assert 'php8' in identify.ALL_TAGS # by shebang
assert 'nushell' in identify.ALL_TAGS


def test_tags_from_path_does_not_exist(tmpdir):
Expand Down Expand Up @@ -153,6 +154,7 @@ def test_tags_from_path_plist_text(tmpdir):
(
('.salt-lint', {'text', 'salt-lint', 'yaml'}),
('test.py', {'text', 'python'}),
('test.nu', {'text', 'nushell'}),
('test.mk', {'text', 'makefile'}),
('Makefile', {'text', 'makefile'}),
('Containerfile', {'text', 'dockerfile'}),
Expand Down Expand Up @@ -211,6 +213,8 @@ def test_tags_from_filename(filename, expected):
('python3', {'python3', 'python'}),
('python3.5.2', {'python3', 'python'}),
('/usr/bin/python3.5.2', {'python3', 'python'}),
('nu', {'nushell'}),
('nushell', {'nushell'}),
('/usr/bin/herpderpderpderpderp', set()),
('something-random', set()),
('', set()),
Expand Down
Loading