view dot_config/private_fish/functions/push_input.fish @ 1052:33ed4d4bba1d

feat: add to-fish for bookmarking directories
author Zeger Van de Vannet <zeger.van_de_vannet@nokia.com>
date Tue, 23 Jul 2024 16:46:22 +0200
parents fb4670b7526a
children
line wrap: on
line source

function push-input
    set -g --prepend pushed_input (commandline | string collect)
    commandline -r ""
end

function pop-input --on-event fish_postexec
    if test -n "$pushed_input[1]"
        commandline -r -- $pushed_input[1]
        set -g --erase pushed_input[1]
    end
end