-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansi link #7751
Ansi link #7751
Conversation
Just a question. I'm wondering if it's more nushelly to make this |
(Type::Record(vec![]), Type::Record(vec![])), | ||
]) | ||
.named( | ||
"text", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"text", | |
"title", |
It just seems to me that --title
is the better name for this parameter than --text
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the point I'm making. In your html example, the title
is "A new type of shell" so the link shows "A new type of shell" instead of showing "https://nushell.sh". That's why I'm suggesting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know of no way to control the tooltip either, but I wasn't talking about the tool tip. I prefer title but I'm not going to die on this hill. It's not that big of a deal. I'll let someone else accept or deny this PR.
I really like this and thanks for making those changes. It definitely feels more like nushell now. |
Description
Add
ansi link
command that adds special ansi escape sequence to create a link in terminal:This command accepts two arguments: uri of link and optional link text. If second parameter is not present link is displayed as is:
More info on links in terminals https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
User-Facing Changes
New
ansi link
commandTests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --check
to check standard code formatting (cargo fmt --all
applies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
to check that you're using the standard code stylecargo test --workspace
to check that all tests passAfter Submitting
If your PR had any user-facing changes, update the documentation after the PR is merged, if necessary. This will help us keep the docs up to date.