How do I launch an editor from a shell script?

前端 未结 7 435
野性不改
野性不改 2021-02-04 03:44

I would like my tcsh script to launch an editor (e.g., vi, emacs):

#!/bin/tcsh
vi my_file

This starts up vi with my_file but first displays a w

相关标签:
7条回答
  • 2021-02-04 04:49

    I answered my own question! You have to redirect terminal input and output:

    #!/bin/tcsh
    vi my_file < `tty` > `tty`
    
    0 讨论(0)
提交回复
热议问题