I'm trying to improve my screen software, so I'll have a lot of questions because there are many answers that I have difficulty to find on internet... Anyway, this one is about a shell command that I would like screen to execute when opening, and it doesn't...
on a new session of screen, I ask screen to open some windows and to name them and to open a file in each of them, and then to split vertically and to open to new empty windows :
screen -t name1 vim /path/to/folder/file1.txt
screen -t name2 vim /path/to/folder/file2.txt
screen -t name3 vim /path/to/folder/file3.txt
screen -t name4 vim /path/to/folder/file4.txt
split -v
focus
screen
focus
screen
but those files create .file.txt.swp and .file.txt.swo hidden files, as usual, so when my computer shut down and files didn't close properly, when I reopen screen it ask what I must do with the .sw* files... I would like to run first this command rm /path/to/folder/.*.sw*
so it doesn't ask for the action when opening (".file.txt.swp already exist ! [O]open, [E]dit anyway, [R]ecover, [Q]uit, [A]bandoned")
In the shell rm path/to/folder/.*.sw*
deletes every swap files as intended, but I can't make it works in .screenrc
This doesn't work :
rm /path/to/folder/.*.sw*
screen -t name1 vim /path/to/folder/file1.txt
screen -t name2 vim /path/to/folder/file2.txt
screen -t name3 vim /path/to/folder/file3.txt
screen -t name4 vim /path/to/folder/file4.txt
split -v
focus
screen
focus
screen
neither does this :
exec rm /path/to/folder/.*.sw*
...
nor this :
eval 'rm /path/to/folder/.*.sw*'
...
or even this :
stuff rm /path/to/folder/.*.sw*
...
and a lot of other 'blind' tries...
Well I have no idea what I'm doing :p