File tree Expand file tree Collapse file tree 3 files changed +7
-26
lines changed
Expand file tree Collapse file tree 3 files changed +7
-26
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,3 @@ gitql-cli = "0.28.0"
1919gitql-ast = " 0.25.0"
2020gitql-parser = " 0.27.0"
2121gitql-engine = " 0.28.0"
22- atty = " 0.2.14"
Original file line number Diff line number Diff line change 1+ use std:: io;
2+ use std:: io:: IsTerminal ;
13use std:: path:: Path ;
24
35use crate :: engine:: EvaluationResult :: SelectedGroups ;
46use arguments:: Arguments ;
57use arguments:: Command ;
6- use atty:: Stream ;
78use data_provider:: FileDataProvider ;
89use gitql_cli:: arguments:: OutputFormat ;
910use gitql_cli:: diagnostic_reporter;
@@ -98,13 +99,15 @@ fn launch_fileql_repl(arguments: Arguments) {
9899 let mut input = String :: new ( ) ;
99100
100101 loop {
102+ let stdio = io:: stdin ( ) ;
103+
101104 // Render Prompt only if input is received from terminal
102- if atty :: is ( Stream :: Stdin ) {
103- print ! ( "fql > " ) ;
105+ if stdio . is_terminal ( ) {
106+ print ! ( "fileql > " ) ;
104107 }
105108
106109 std:: io:: Write :: flush ( & mut std:: io:: stdout ( ) ) . expect ( "flush failed!" ) ;
107- match std :: io :: stdin ( ) . read_line ( & mut input) {
110+ match stdio . read_line ( & mut input) {
108111 Ok ( buffer_length) => {
109112 if buffer_length == 0 {
110113 break ;
You can’t perform that action at this time.
0 commit comments