Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-rust-mirrors-rustyline
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-rust-mirrors-rustyline
Commits
86dea92d
Commit
86dea92d
authored
6 years ago
by
gwenn
Browse files
Options
Downloads
Patches
Plain Diff
Rustfmt
parent
a2368ff9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example.rs
+1
-2
1 addition, 2 deletions
examples/example.rs
src/lib.rs
+7
-3
7 additions, 3 deletions
src/lib.rs
with
8 additions
and
5 deletions
examples/example.rs
+
1
−
2
View file @
86dea92d
...
...
@@ -39,8 +39,7 @@ impl Hinter for MyHelper {
}
}
impl
Helper
for
MyHelper
{
}
impl
Helper
for
MyHelper
{}
fn
main
()
{
init_logger
()
.is_ok
();
...
...
This diff is collapsed.
Click to expand it.
src/lib.rs
+
7
−
3
View file @
86dea92d
...
...
@@ -623,10 +623,14 @@ fn readline_direct() -> Result<String> {
///
/// TODO Tokenizer/parser used for both completion, suggestion, highlighting.
/// (parse current line once)
pub
trait
Helper
where
Self
:
Completer
,
Self
:
Hinter
{
pub
trait
Helper
where
Self
:
Completer
,
Self
:
Hinter
,
{
/// Decorate `line` with [ansi color](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters).
/// Rustyline will try to handle escape sequence for ansi color on windows
when not supported natively (windows <10).
/// TODO to be used
/// Rustyline will try to handle escape sequence for ansi color on windows
///
when not supported natively (windows <10).
TODO to be used
fn
highligh
(
line
:
&
str
)
->
Cow
<
str
>
{
Borrowed
(
line
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment