Skip to content

Commit 3139779

Browse files
committed
feat: use pickme for picking files if available
1 parent c02c511 commit 3139779

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lua/utils/shell.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local job = require('plenary.job')
66

77
local os = require('os')
88
local noti = require('utils.notification')
9-
local pickme = require('pickme')
9+
local utils = require('utils')
1010

1111
---@class Utils.Shell
1212
local M = {}
@@ -61,7 +61,11 @@ M.open_session_or_dir = function(dir)
6161
end
6262
end
6363
vim.cmd('cd ' .. dir)
64-
pickme.pick('files', { cwd = dir })
64+
if utils.is_available('pickme') then
65+
require('pickme').pick('files', { cwd = dir })
66+
else
67+
vim.cmd('edit ' .. dir)
68+
end
6569
end
6670

6771
return M

0 commit comments

Comments
 (0)