feat: expand cwd param (#161)

Now you can use `expand()` string to show up entries by `cwd` param.

```vim
:Telescope frecency workspace=CWD cwd=~
:Telescope frecency workspace=CWD cwd=%:p:h
```
This commit is contained in:
JINNOUCHI Yasushi 2024-01-01 08:08:02 +09:00 committed by GitHub
parent 6e2c1df245
commit 9c18474d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,6 +129,9 @@ function Frecency:start(opts)
local start = os.clock()
log.debug "Frecency:start"
opts = opts or {}
if opts.cwd then
opts.cwd = vim.fn.expand(opts.cwd)
end
self.picker = Picker.new(self.database, self.entry_maker, self.fs, self.recency, {
default_workspace_tag = self.config.default_workspace,
editing_bufnr = vim.api.nvim_get_current_buf(),