comparison dot_config/private_fish/functions/push_input.fish @ 1044:fb4670b7526a

feat: replicate push-line function from zsh source: https://github.com/fish-shell/fish-shell/issues/7800#issuecomment-792915764
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 02 May 2024 08:48:33 +0200
parents
children
comparison
equal deleted inserted replaced
1043:3395b4109688 1044:fb4670b7526a
1 function push-input
2 set -g --prepend pushed_input (commandline | string collect)
3 commandline -r ""
4 end
5
6 function pop-input --on-event fish_postexec
7 if test -n "$pushed_input[1]"
8 commandline -r -- $pushed_input[1]
9 set -g --erase pushed_input[1]
10 end
11 end