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 { mut existing = ($env.config.keybindings? | default []) if not ($existing | where name == "alt_l_history_completion" | is-not-empty) { $existing = ($existing | append [$alt_l_history_completion]) } if not ($existing | where name == "alt_uppercasel_history_completion" | is-not-empty) { $existing = ($existing | append [$alt_uppercasel_history_completion]) } $env.config = ($env.config? | default {} | upsert keybindings $existing) }