fish/functions/_autopair_insert_right.fish 330 B raw
1
function _autopair_insert_right --argument-names key
2
    set --local buffer (commandline)
3
    set --local before (commandline --cut-at-cursor)
4
5
    switch "$buffer"
6
        case "$before$key"\*
7
            commandline --cursor (math (commandline --cursor) + 1)
8
        case \*
9
            commandline --insert -- $key
10
    end
11
end