gr "" doesn't exit correctly
blakemcbride opened this issue · comments
Greetings,
If I run gr
, type some text, and then exist with alt-x
, gr asks me if I want to exit without saving the unsaved text. However, if I type gr ""
it does not. Why?
empty argument, no effect
Sorry, I do not understand your response. To be a little more clear, there are three steps as follows:
# gr ""
abcde
alt-x
Grief does not ask me if I want to exit without saving the unsaved text. However, if I type gr
without the ""
it does. Why?
See the video at https://blakemcbride.us/files/grief.mkv
gr
is opening newfile
, whereas gr ""
is \*scratch\*
.
Scratch refers to the internal temporary/system-buffer aka clip-board, which wont ever be saved since its a system buffer.
Condition is due to the failure to open any files, with scratch being the only available buffer attachable to the main window.
Issue can be addressed by opening a new file, which shall become the new buffer attached to the active window.
Shall tweak startup to ignore empty parameter(s, an unusual use-case.
Note: gr -m mc
is similar to vim;s file picker mode, shall consider option to call inline if only a directory is stated on cmdline
opendir