Skip to content

Commit

Permalink
Merge pull request #247 from med8bra/patch-1
Browse files Browse the repository at this point in the history
fix(sed): detect sed on darwin
  • Loading branch information
EpsilonKu committed Jul 30, 2024
2 parents 1f7562e + af29667 commit ba7fb77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/spectre/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end

M.check_replace_cmd_bins = function()
if state.user_config.default.replace.cmd == 'sed' then
if vim.loop.os_uname().sysname == 'Darwin' then
if vim.loop.os_uname().sysname == 'Darwin' and vim.fn.executable('sed') == 0 then
config.replace_engine.sed.cmd = 'gsed'
if vim.fn.executable('gsed') == 0 and state.user_config.replace_engine.sed.warn then
print("You need to install gnu sed 'brew install gnu-sed'")
Expand Down

0 comments on commit ba7fb77

Please sign in to comment.