dotfiles/fish/functions/_autopair_insert_right.fish
Julius Klotz e1f49b8878 initial commit
2025-02-21 11:32:33 +01:00

12 lines
330 B
Fish

function _autopair_insert_right --argument-names key
set --local buffer (commandline)
set --local before (commandline --cut-at-cursor)
switch "$buffer"
case "$before$key"\*
commandline --cursor (math (commandline --cursor) + 1)
case \*
commandline --insert -- $key
end
end