R
for repaint does not always reload the file.[1]
A workaround that always reloads the file is to press hq
, which will open the Help page, then quit. It has a side effect of forcing the file to reload.
[1] Here are some examples of situations that R
do and do not reload:
>
and >>
changes: DO get reloaded
sed -i
, gEdit, TextEdit: DO NOT get reloaded
- On Linux,
vi
changes: DO get reloaded
- On Mac,
vi
changes: DO NOT get reloaded
I believe the difference comes down to whether the inode changes (you can check with ls -i foo.txt
). If the inode changes, then R
will not work.
tail -f foo.log | grep bar
, and to be able to dynamically change the grep command with restarting the tail/grep pipeline. – Alexander Mills Sep 13 '18 at 23:56