Skip to content

Commit

Permalink
feat(nvim): make cheat.sh work with one line words
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Feb 2, 2024
1 parent 45ad8ba commit a9ee990
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nvim/lua/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ function M.cheatSheetCommand(detect_language)
end
end

local command = language .. "/" .. searchPhrase
local command = ""
if searchPhrase == nil then
command = language
else
command = language .. "/" .. searchPhrase
end

M.info("cht.sh/" .. command, "Cheat Sheet Query")
return ("!curl -s cht.sh/" .. command)
Expand Down

0 comments on commit a9ee990

Please sign in to comment.