termux / termux/termux-exec-package

Is it possible to support C99-style shebang-like interpreter directives?

Open
#22 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
265
Forks
87
PR merge metrics
No merged PRs in 30d

Description

There are a few languages that use only C/C++-style comments but doesn't fully support using shebangs such as Go.

Instead they use the first commented line as the interpreter directive.

Example

Go

//usr/bin/env go run "$0" "$@";exit $?

I'm using JBang which allows scripting in Java using the same syntax.

//usr/bin/env jbang "$0" "$@";exit $?

I tried editing the file but that didn't work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file, test, or entry point. Start by locating the C execve wrapper and its existing shebang handling, then trace how the first line is parsed for Go and JBang-style examples. Done means the supplied C99-style directives are recognized without breaking current shebang behavior, with tests covering both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.