Skip to content

lugray/progressive_prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Progressive Prompt

Allow rendering a prompt immediately, then spend time making it progressively more informative without blocking work.

.zshrc:

TRAPALRM() {
  if [[ -n "$WIDGET" ]]; then
    zle reset-prompt
  fi
}
function __progressive_prompt_exec_incr() {
  __progressive_prompt_exec_no=$((__progressive_prompt_exec_no+1))
}
precmd_functions+=(__progressive_prompt_exec_incr)
setopt PROMPT_SUBST
placeholder="\$ "
PROMPT='$(progressive_prompt $$ $__progressive_prompt_exec_no "$placeholder" prompt)'

$placeholder is a string to use a placeholder prompt until your prompt program first generates a prompt.

prompt should be an executable that outputs iterative prompts separated by null bytes, in theory becoming more and more informative. A dummy example is provided.

Credits

This owes its inspiration to https://github.com/burke/async-shell-prompt

About

Render a changing git prompt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages