pub fn default_prompt(state: &State<'_, DirParseState>, sh: &Shell) -> StyledBufExpand description
Default example prompt that displays some information based on language
Examples found in repository?
examples/basic.rs (line 10)
9 10 11 12 13 14 15 16 17 18 19 20
fn prompt_right(state: State<DirParseState>, sh: &Shell) -> StyledBuf {
let project_info = default_prompt(&state, sh);
let git_branch = state
.get_module_metadata::<Git>("git")
.map(|git| format!("git:{}", git.branch));
styled_buf! {
project_info,
git_branch
}
}