0

I'm using

org.springframework.shell:spring-shell-starter:2.0.0.RELEASE 

With gradle and Spring

My question is: Is there anyway to open vi or vim to edit a file in the OS from the shell?. if not what alternatives do I have to edit this file?

Regards

James

James Hameson
  • 331
  • 1
  • 4
  • 10

1 Answers1

1

I m not pretty sure with Spring, but with in Java you can, using ProcessBuilder and moreover it will help you to execute multiple command sets.

Quick look: https://www.geeksforgeeks.org/java-lang-processbuilder-class-java/

Simmant
  • 1,477
  • 25
  • 39
  • Thanks, I considered that alternative,but I know that Spring Shell 1.0 provides a notation with "! command" to execute a command, but I cannot make it work in 2.0 – James Hameson Oct 07 '18 at 23:49