tern-term: ftps:// links are not clickable in terminal output

Closed Beginner friendly
#40 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@montionugera is already working on this.

Since Oct 13, 2026.

  • #50 by @montionugera — merged

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
94/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli, desktop

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

area::tern-term difficulty::easy good first issue kind::bug triage::ready
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

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.

More from your-moon/tern

All issues in your-moon/tern

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.