Files
TerminalPolyjuice/nushell/modules/pj_historyhintcomplete.nu

43 lines
1.2 KiB
Nu

const alt_l_history_completion = {
name: alt_l_history_completion
modifier: alt
keycode: char_l
mode: [emacs, vi_insert, vi_normal]
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}
const alt_uppercasel_history_completion = {
name: alt_uppercasel_history_completion
modifier: alt_shift
keycode: char_l
mode: [emacs, vi_insert, vi_normal]
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright, select: false}
]
}
}
export-env {
let has_alt_l_history_completion = $env.config.keybindings | where name == "alt_l_history_completion" | is-not-empty
if not $has_alt_l_history_completion {
$env.config.keybindings = $env.config.keybindings | append [
$alt_l_history_completion
]
}
let has_alt_uppercasel_history_completion = $env.config.keybindings | where name == "alt_uppercasel_history_completion" | is-not-empty
if not $has_alt_uppercasel_history_completion {
$env.config.keybindings = $env.config.keybindings | append [
$alt_uppercasel_history_completion
]
}
}