Closed Juliaria08 closed 11 months ago
Hi @Juliaria08.
the file $HOME/.config/clifm/.last isn't created by clifm
Clifm does create this file itself at exit (as a symlink to ~/.config/clifm/profiles/PROFILE/.last
, so that the profile name doesn't matter). I've reproduced all the steps you pointed out and see no error: the file is there. Whatever is the problem, it must be something else.
Btw, have you sourced the script as specified in the wiki? Have you executed clifm using the function name specified in the script (by default c
)?
The complete procedure is as follows:
source /usr/share/clifm/functions/cd_on_quit.sh
c
# Once in Clifm:
Q
Yes, I ran that function as shown on the wiki I linked.and I ran c and then Q once there, I see no such symlink. If you have any info about how to troubleshoot inform me in a comment.
Made a clean install (clifm 1.13, from the AUR), using a clean config dir (~/.config/clifm
) and nothing: everything works as expected. Let's try with inotifywait
(from the inotify-tools
package):
inotifywait -m -e create,delete ~/.config/clifm
(let it running).c
and then Q
.~/.config/clifm
. For example, here's the result I get:$ inotifywait -m -e create,delete ~/.config/clifm
Setting up watches.
Watches established.
/home/user/.config/clifm/ DELETE .last
/home/user/.config/clifm/ CREATE .last
This means that the .last
file was first deleted and then recreated at exit.
Oh wait sorry, seems like the file has now been created, weird. I did run it with the parameters I thought I run. I am sorry for anoying you. I got the following result:
$ inotifywait -m -e create,delete ~/.config/clifm
Setting up watches.
Watches established.
/home/user/.config/clifm CREATE .last
Which just told me that the file didn't exist before and that's weird for me, so ethier I didn't ever run the c
command, (which I remember myself running a few hours ago), or for some I ran q
instead of Q
and changed my memory in the meantime.
Good to hear @Juliaria08! And don't worry, shit happens.
Remember that you can alias q
to Q
so that you don't need to run Q
to activate cd-on-quit. Open the config file (F10) and add this line:
alias q='Q'
Remember that you can alias
q
toQ
so that you don't need to runQ
to activate cd-on-quit. Open the config file (F10) and add this line:
I did that, but probably I didn't test that my change worked. Thanks for helping 😃
Since version 1.16.6, Q
(uppercase) isn't required anymore for the cd-on-quit function: the old plain q
will do the trick.
@leo-arch I didn't want to create a new issue for what I think is fixed, but does it actually work with ^d or can I only use q. Is there a workaround?
Hi @mTvare6! Thanks for reporting. With the latest commit cd-on-quit
should work with Ctrl-D as well. Please give it a try and let me know if it works as expected.
Hey @mTvare6, can you confirm that cd-on-quit works now as expected?
Describe the bug The script
cd_on_quit.sh
doesn't work, as the file$HOME/.config/clifm/.last
isn't created byclifm
To Reproduce Steps to reproduce the behavior:
clifm
cat $HOME/.config/clifm/.last
and see errorExpected behavior Ethier the script
cd_on_quit.sh
somehow determines the profile, orclifm
automatically creates.last
inside the$HOME/.config/clifm/
folder, instead of only creating it in$HOME/.config/clifm/profiles/$<CLIFM_PROFILE>/
Desktop (please complete the following information):
aur/clifm
packageAdditional context Also update wiki page if the script is updated.