byexamples / byexamples/byexample

Allow to change the prompt of a runner from command line

Open
#182 0 comments 0 reactions 0 assignees View on GitHub
enhancement request for comments
Dominant language
Python
Stars
67
Forks
9
PR merge metrics
No merged PRs in 30d

Description

**Describe the feature you'd like**
We use `>>>` for Python, `>>` for Ruby, `?:` for C/C++ and we are running out of prompt symbols.

Rust for example uses `>>` which would be in conflict with Ruby's.

In the past we used to say arbitrary *Rust example will use `rs>` as the prompt* and it is a valid *default* decision.

`byexample` must guarantee that any file can contain and mix of languages including Ruby and Rust but that's no necessary a hard requirement for all the users.

People may just want to run a subset of languages and if they want to run Python and Rust, there is no reason to force them to use `rs>` instead of `>>`.

Proposal? Allow the user to change the prompt as we allow him/her to change the command line (shebang).

Contributor guide

Open the contributing guide

Research direction

Start by locating the command-line option handling and the runner prompt selection, then inspect how language-specific default prompts are defined. Done means a user can override a runner prompt from the command line while existing defaults and mixed-language snippets continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, ruby, rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.