-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Milestone
Description
I'm working on trying to replicate powerlevel10k's awesome transient prompt feature.
Here's my first stab:
function fish_prompt
if set -q foo
echo $foo
set -e foo
else
echo $PWD
end
end
function fish_preexec --on-event fish_preexec
set -g foo bar
commandline -f repaint
endThe logic is as follow:
foostarts out undefined, sofish_promptechoes$PWD- Then you hit enter on a command, causing
fish_preexecto run, which sets foo and reruns the prompt - The prompt changes to
$fooand erases it - The command starts running
Thus the currently prompt will always be $PWD and all previous ones will be $foo
It doesnt work. Is there a way of doing what I want? If not, can it be added?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels