diff --git a/sample_async.xsh b/sample_async.xsh new file mode 100644 index 0000000..cc6b096 --- /dev/null +++ b/sample_async.xsh @@ -0,0 +1,22 @@ +count = 0 + +def prompt(): + global count + _count = count + count = count + 1 + return '{SLOWBLINK_PURPLE}str(_count) + ' $ {RESET}' + +$PROMPT = prompt + +$UPDATE_PROMPT_ON_KEYPRESS = True +$PROMPT_REFRESH_INTERVAL = 1 + + + +from xontrib import prompt_vi_mode +def prompt(): + return prompt_vi_mode.vi_mode() + ' $ ' + + +$PROMPT = prompt +