Skip to content

Commit

Permalink
fix: rmagatti#300 sort picker by newest
Browse files Browse the repository at this point in the history
Also, removing fd and fdfind as we just need a simple directory listing.
Keeping ripgrep because having one command that's consistent cross
platform is nice.
  • Loading branch information
cameronr committed Aug 27, 2024
1 parent 337ac10 commit ab5f311
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lua/auto-session/session-lens/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,11 @@ SessionLens.search_session = function(custom_opts)
end
return opts.find_command
elseif 1 == vim.fn.executable "rg" then
return { "rg", "--files", "--color", "never" }
elseif 1 == vim.fn.executable "fd" then
return { "fd", "--type", "f", "--color", "never" }
elseif 1 == vim.fn.executable "fdfind" then
return { "fdfind", "--type", "f", "--color", "never" }
elseif 1 == vim.fn.executable "ls" and vim.fn.has "win32" == 0 then
return { "ls" }
return { "rg", "--files", "--color", "never", "--sortr", "modified" }
elseif 1 == vim.fn.executable "ls" then
return { "ls", "-t" }
elseif 1 == vim.fn.executable "cmd" and vim.fn.has "win32" == 1 then
return { "cmd", "/C", "dir", "/b" }
return { "cmd", "/C", "dir", "/b", "/o-d" }
end
end)()

Expand Down

0 comments on commit ab5f311

Please sign in to comment.