SYNOPSIS

#include <sys/driver_hooks.h>
set_driver_hook( H_PRINT_PROMPT, value)

DESCRIPTION

Arguments:
  • value (string) – void <name>(string prompt).
  • value (closure) – void <closure>(string prompt)

Optional hook to print the current command prompt. If this hook is not set, the driver will just print the prompt to the user.

The hook is called with the prompt string as single argument and has to print the prompt, e.g. using write(E) or binary_message(E).

If the hook is a string, it is the name of an lfun in the command giver. If the hook is a closure, it is called with the command giver as previous object.

HISTORY

  • introduced (3.3.163)