Skip to main content

ZSH

Constant ZSH 

Source
pub const ZSH: &str = r#"
_forge_cmd_running=0
_forge_precmd() {
  local ret=$?
  if (( _forge_cmd_running )); then
    printf '\033]133;D;%s\007' "$ret"
    _forge_cmd_running=0
  fi
  printf '\033]133;A\007\033]133;B\007'
}
_forge_preexec() {
  _forge_cmd_running=1
  printf '\033]133;C\007'
}
precmd_functions+=(_forge_precmd)
preexec_functions+=(_forge_preexec)
"#;
Expand description

The zsh integration: precmd closes the previous command and opens the prompt, preexec opens the command.