Skip to content
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

Output redirection #507

Merged
merged 5 commits into from
Feb 7, 2020
Merged

Output redirection #507

merged 5 commits into from
Feb 7, 2020

Conversation

mattirn
Copy link
Collaborator

@mattirn mattirn commented Feb 4, 2020

Command output redirection to variable and file.

Example:

 % ./build repl 
JLine terminal: xterm-256color                             
groovy-repl> # redirect to variable 
groovy-repl> resp=widget -la
groovy-repl> resp.split('\n').findAll{it=~/accept/}
.accept-and-hold
.accept-and-infer-next-history
.accept-line
.accept-line-and-down-history
_tailtip-accept-line
accept-and-hold
accept-and-infer-next-history
accept-line
accept-line-and-down-history
groovy-repl> 
groovy-repl> # redirect to file
groovy-repl> show > data.dat
groovy-repl> 
groovy-repl> # append to file
groovy-repl> keymap >> data.dat

@mattirn
Copy link
Collaborator Author

mattirn commented Feb 7, 2020

Fixes #509

@mattirn mattirn merged commit b471f94 into jline:master Feb 7, 2020
@mattirn mattirn deleted the output-redirection branch February 7, 2020 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant