tern-term: ftps:// links are not clickable in terminal output
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 94/100
Research direction
Start in crates/tern-term/src/links.rs, where the issue identifies the SCHEMES list and url_in tests. Add the supplied regression case and run cargo test -p tern-term links. Done when the test detects the plain-text ftps:// link and the scheme list agrees with the existing is_openable safety check.
Written by the indexing model from the issue text.
Description
What happened?
A plain-text ftps://host/file in terminal output is not underlined or clickable. The scanner in crates/tern-term/src/links.rs only looks for the schemes in SCHEMES (https://, http://, ftp://, mailto:), while the safety check is_openable in the same file already accepts ftps://. So an OSC 8 hyperlink to an ftps:// target opens, but the same text typed in plain output does not. ftp:// does not match ftps:// because the fourth character differs.
What did you expect to happen?
ftps:// is detected the same way as ftp://, and the two lists agree.
How can we reproduce it (as minimally and precisely as possible)?
Add this to the url_in tests at the bottom of crates/tern-term/src/links.rs and run cargo test -p tern-term links:
assert_eq!(
url_in("get ftps://files.a.test/x.tgz now", "ftps").as_deref(),
Some("ftps://files.a.test/x.tgz")
);
It fails with left: None. In the app: connect to any host, run echo ftps://files.example.com/a.tgz, and cmd-click the text; nothing happens.
Anything else we need to know?
Add "ftps://" to SCHEMES (change the array length from 4 to 5). Keep is_openable as it is; do not add any scheme that is not already in it, because the text comes from a remote machine. Optionally, make is_openable and SCHEMES share one list so they cannot drift again, but that is not required.
Version
tern --version:
tern 0.1.3
Difficulty: easy. Read CONTRIBUTING.md before opening a pull request; there is no copyright assignment or CLA.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 2
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 35
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from your-moon/tern
-
kind::feature triage::needed
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
vault: the "Save the password … in tern's vault?" offer lands before the shell prompt and mixes with itPossibly taken @itskamol claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
kind::feature triage::needed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aaif-goose/goose#13364 ·
Maintainers usually reply within 1 day
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ClickHouse/ClickHouse#130006 ·
Maintainers usually reply within 1 day
-
[Bug]: PostgreSQL backend: Queue.remove() / Job.remove() never emit the QueueEvents "removed" eventPossibly taken @1AbdullahButt claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
taskforcesh/bullmq#5085 ·
Maintainers usually reply within 1 day