# HG changeset patch # User Zeger Van de Vannet # Date 1714632513 -7200 # Node ID fb4670b7526aa08e2e6fbc09cf62b3045d22248e # Parent 3395b41096882d48a46a025d0088233d55c09173 feat: replicate push-line function from zsh source: https://github.com/fish-shell/fish-shell/issues/7800#issuecomment-792915764 diff -r 3395b4109688 -r fb4670b7526a dot_config/private_fish/config.fish --- a/dot_config/private_fish/config.fish Thu May 02 08:41:10 2024 +0200 +++ b/dot_config/private_fish/config.fish Thu May 02 08:48:33 2024 +0200 @@ -30,5 +30,8 @@ # Select revisions from the stack bind \ek fzf_hg_stack + # Push current cmdline input to the stack + bind \eq push-input + abbr hgst hg status end diff -r 3395b4109688 -r fb4670b7526a dot_config/private_fish/functions/push_input.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/private_fish/functions/push_input.fish Thu May 02 08:48:33 2024 +0200 @@ -0,0 +1,11 @@ +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