Comments (6)
And for ?
from rustyline.
In my code, I ignore it. It's handy if you want to discard the current line. python
does it.
from rustyline.
Something like:
impl<C: Completer> Iterator for Editor<C> {
type Item = Result<String>;
fn next(&mut self) -> Option<Result<String>> {
let readline = self.readline(""); // FIXME prompt
match readline {
l @ Ok(_) => Some(l),
Err(error::ReadlineError::Eof) => None,
e @ Err(_) => Some(e),
}
}
}
?
from rustyline.
Yeah, something like that. The prompt could be configured at creation time, since it tend to stay the same for most program. You should also keep the current interface, in case someone want to do something different
from rustyline.
SGTM. Just add an implementation for IntoIterator
for extra convenience ^^
from rustyline.
2.0 released
from rustyline.
Related Issues (20)
- Compilation error when compiling example.rs HOT 1
- clipboard-win's license (which is BSL) seems not compatible MIT license HOT 3
- Highlighter::highlight_candidate() candidate argument should be Completer::Candidate HOT 1
- Caret key (`^`) does not work as expected in evcxr_repl in vi edit mode HOT 2
- EOF should maybe yield `ReadlineError::Eof` instead of just terminating `Editor::iter` HOT 5
- Help, how to use multiline input prompt? Following the example code in `input_multiline.rs` but it does not compile HOT 1
- How to test an app that uses rustyline? HOT 5
- Being able to bind Shift+Enter to something else HOT 1
- How to access LineBuffer? HOT 1
- Create a separate crate for KeyEvent management
- New release HOT 1
- v10.1.0 increases the MSRV to 1.62 HOT 9
- MSRV policy HOT 4
- Examples on `master` branch don't compile using latest version HOT 2
- Example on README does not compile HOT 2
- New release? HOT 1
- Multiple lines sent on pty input by `expect` are not seen by process HOT 6
- ExternalPrinter can't handle ASCII control character HOT 5
- How to clear the screen? HOT 2
- Support CSI-u escape sequences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustyline.