leo-arch / clifm

The shell-like, command line terminal file manager: simple, fast, extensible, and lightweight as hell.
https://github.com/leo-arch/clifm/wiki
GNU General Public License v2.0
1.29k stars 41 forks source link

`.last` is written to unexpected directory? #238

Closed spenserblack closed 11 months ago

spenserblack commented 11 months ago
$ clifm --version
1.13

Describe the bug I just got started with clifm a few minutes ago, sorry if I'm misinterpreting something. I've been working on translating cd_on_quit.sh to fish (and then make a PR :wink:), and after trying to figure out why it's not working, I realized that the file $HOME/.config/clifm/.last didn't exist. Instead, it seemed to be written to $HOME/.config/clifm/profiles/default/.last.

Does cd_on_quit.sh need to be updated?

To Reproduce Steps to reproduce the behavior:

clifm --cd-on-exit
# play around
q
cat $HOME/.config/clifm/.last  # file not found
cat $HOME/.config/clifm/profiles/default/.last  # last location written

Expected behavior Either $HOME/.config/clifm/.last or $XDG_CONFIG_HOME/clifm/.last to exist, or /usr/share/clifm/functions/cd_on_quit.sh to have the right filepath.

leo-arch commented 11 months ago

Hi @spenserblack. It's not an error: ~/.config/clifm/.last is automatically created by clifm itself (when running with --cd-on-quit and the exit command is Q (not q)) as a symlink to ~/.config/clifm/profiles/PROFILE/.last (it is automatically removed too).

EDIT: You can take a look at the docs for some more info.

spenserblack commented 11 months ago

Oh, that's embarrassing :sweat_smile:

I should really RTFM

Anyway, would translations of the functions to .fish be a welcome PR?

leo-arch commented 11 months ago

Absolutely!