Repository navigation
Install the Vim/Neovim plugin via CMake, fix executable path escaping - #11
Merged
Merged
Conversation
The auto-appended current-buffer file was already shellescape()'d, but the configured executable path was spliced into the shell command string as-is, breaking on paths with spaces (e.g. Windows' Program Files).
Lets a cmake --install'd prefix (not just a git checkout) serve as the
Vim/Neovim plugin root, so a plugin manager can point at the installed
tree instead of keeping a separate clone around. Installs
editor/vim/{plugin,autoload,doc} into <prefix>/share/ckgrep/vim,
opt-in and off by default like BUILD_DOC.
Bump version to 1.1.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
g:ckgrep_executablein the Vim/Neovim plugin, which previously broke on executable paths containing spaces.INSTALL_VIM_PLUGINCMake option (off by default, same pattern asBUILD_DOC) that installseditor/vim/{plugin,autoload,doc}into<prefix>/share/ckgrep/vim, so acmake --install'd prefix can serve as the plugin root for a plugin manager (lazy.nvim, vim-plug, etc.) instead of requiring a separate git checkout.editor/vim/README.md.Test plan
cmake -S . -B build -DINSTALL_VIM_PLUGIN=ON && cmake --build build && cmake --install build --prefix <tmp>and confirmedshare/ckgrep/vim/{plugin,autoload,doc}andbin/ckgrepland as expected.INSTALL_VIM_PLUGINunset) does not install the plugin tree.