* feat(picker): command history filter
I've recently start using command history. For sometime was a bit annoyed of unrelevant commands
like edit/write and others (most likely only used once)
I've considered using lua patterns, however, logical `or` isn't a thing. Additionally, passing a list of lua patterns and checking each pattern for each command history entry felt tedious.
This PR introduce a new optional function to filter command history items.
For example, in my configurations
~~~lua
local command_history_ignore = vim.regex "edit\\|Move\\|write\\|Write\\|e\\s\\|lua\\sI("
overrides.command_history = minimal {
prompt_prefix = "CMDHistory> ",
filter_fn = function(item)
if #item < 3 then
return false
else
return not command_history_ignore:match_str(item)
end
end,
}
~~~
* [docgen] Update doc/telescope.txt
skip-checks: true
Co-authored-by: Github Actions <actions@github>
This commit fixes a bug that lead to an error because we tried to
concatenate a table (`err`) to a string. Now we concatenate
`err.message` (a string) to the string.
Yes the diff to parent preview will be blank but at the very least a user can follow a file around various moves and get access to the SHA-ID for the move.
Fixes the crash below by sanitizing the title to not include the
linebreak (replacing it by a "\n" string)
stack traceback:
[C]: in function 'nvim_buf_set_lines'
.../nvim/plugged/plenary.nvim/lua/plenary/window/border.lua:222: in function '__align_calc_config'
.../nvim/plugged/plenary.nvim/lua/plenary/window/border.lua:266: in function 'new'
...are/nvim/plugged/plenary.nvim/lua/plenary/popup/init.lua:384: in function 'create'
...re/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:326: in function '_create_window'
...re/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:399: in function 'find'
...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:151: in function 'v'
...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:475: in function 'v'
...im/plugged/telescope.nvim/lua/telescope/builtin/init.lua:487: in function 'grep_string'
Fixes#2023