setup screen session as an IDE on shell
Stdcerr <stdcerr-zJpx2rpV7r/[email protected]> Fri, 27 Dec 2019 04:29:34 +0100
| Newsgroups | gmane.comp.gnu.screen.user |
|---|---|
| Message-ID | <[email protected]> |
I would like to write a script that uses screen to automatically create a few windows within which particular commands will be executed. Think of it like an IDE on the shell. Now I know that I can create windows and applications launched within them. Now, I would like to launch the following commands in window's given descriptive names: chdir ~/src/projectA * vim * git pull * cd build/ * cd build/ && tmux The intention is to launch the session from a script with: /usr/bin/screen -dmS name -c /home/user/scripts/.screenrc_name Where `~/scripts/.screenrc_name` looks like: #bind keys to move between regions bind j focus down bind k focus up bind l focus right bind h focus left # don't display the copyright page startup_message off # increase scrollback buffer size defscrollback 10000 # don't kill window after the process die zombie "^[" # create windows chdir ~/src/scaper screen -t code vim & screen -t git git pull & screen -t build cd build/ & screen -t exec cd build/ tmux When I connect to the session with `screen -r name`, I get into the `exec` window correctly, but it's stuck and it says `Cannot exec `cd`: No such file or directory`. And I'm getting the following: $ which cd which: no cd in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin) [ron@OldNotebook scripts]$ type cd cd is a shell builtin I was wondering how I best address this issue? Thank you! ~