File: prompt

package info (click to toggle)
emacspeak 49.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,124 kB
  • sloc: lisp: 60,077; xml: 14,159; tcl: 1,332; cpp: 1,175; sh: 859; makefile: 754; python: 534; perl: 419
file content (15 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Set up prompts for bash: -*- mode: sh -*-
SOUNDDIR=${EMACSPEAK_DIR}/sounds/pan-chimes
EBASH=${EMACSPEAK_DIR}/bash-utils
SUCCESS=$SOUNDDIR/item.wav
FAIL=$SOUNDDIR/warn-user.wav

function prompt () {
  case "$?" in
    0) aplay -N -q   ${SUCCESS}  1>&- 2>&-;;
    *) aplay  -N -q  ${FAIL} 1>&- 2>&-  ;;
  esac
  if [ $TERM == "dumb" -o $TERM == "emacs" ]; then ${EBASH}/emnotify `pwd`; fi
}

export PROMPT_COMMAND=prompt