Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File browser last directory #389

Open
domi413 opened this issue May 16, 2024 · 2 comments
Open

File browser last directory #389

domi413 opened this issue May 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@domi413
Copy link

domi413 commented May 16, 2024

Bug Report / Feature Request

Summary:
When using telescope-file-browser.nvim, the directory does not persist between sessions. For example, if I open Neovim in $HOME and navigate to ~/Downloads, the next time I open the file browser, it defaults back to $HOME instead of the previously navigated directory (~/Downloads).

Steps to Reproduce:

  1. Open Neovim in the $HOME directory.
  2. Use telescope-file-browser.nvim to navigate to ~/Downloads.
  3. Close the file browser.
  4. Reopen the file browser.

Expected Behavior:
The file browser should open in the last navigated directory (~/Downloads) instead of the initial directory ($HOME).

Actual Behavior:
The file browser reopens in the initial directory ($HOME) instead of the last navigated directory (~/Downloads).

I'm using the default settings provided in the README, I'm sorry if this option is already provided and I just coulnd't find it out

@domi413 domi413 added the enhancement New feature or request label May 16, 2024
@domi413
Copy link
Author

domi413 commented May 18, 2024

I found out that I can change the cwd with fb_actions.change_cwd and I'm trying to implement a workaround so that when I exit the file browser with esc the new directory is set automatically, but the workarount doesn't work yet (the way I want)...

@aniketgm
Copy link

aniketgm commented Jun 27, 2024

This seems to be a behaviour specific to individuals. I'm assuming you open nvim from HOME directory. So the file_browser will open where the current directory `cwd' is.

I'm saying specific, because some might want to open file_browser from the HOME directory/the directory where they are currently in :pwd. However, some might want it to be the last visited directory. I would suggest this be option based with an option something like open_prev_path = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants