NAME
bk prompt − prompt a user with a message
SYNOPSIS
bk prompt [opts] [message]
DESCRIPTION
bk prompt is used to prompt a user with a message, get a
positive or negative response, and exit accordingly.
This interface may be used for either command line or graphical environments.
If the environment variable BK_GUI is set, then the graphical version will be used instead of the command line version. All of the BitKeeper GUI tools set this variable automatically such that any call to bk prompt from inside the graphical tools will result in a graphical prompt, including the execution of any user supplied triggers.
If the environment variable BK_MSG_GEOM is set, the graphical tool will use the value of this variable to locate itself on the screen. The format of the variable must be in the form +x+y where x and y are screen coordinates. bk citool sets this variable automatically such that the prompt will be at the same x/y location as the upper left corner of citool.
OPTIONS
−c Only for command line prompts, print the
message and exit 0.
−e Indicates that the prompt is an error message.
−ffile Specifies the file contain the
message to be displayed. Unless this option or the
−p option is present, the last command line
argument must be present and is used as the message.
−g Override the BK_GUI
variable and force a command line prompt if called in a
graphical context.
−i Indicates that the prompt is an informational
message.
−nno If set, specifies the message for the
label in the graphical tool which is to be used if the user
does not agree. Default is “NO”. Not used in
command line context.
−o OK only, clears the default “NO”
value. Not used in command line context.
−pprog If set, specifies a program which,
when run, will produce the message contents.
−ttitle If set, specifies the title of the
graphical tool. Default is “BitKeeper Message”.
Not used in command line context.
−yyes If set, specifies the message for the
label in the graphical tool, or the prompt in the command
line tool, which is to be used if the user does agree.
Default is “OK”.
−w Indicates that the prompt is a warning
message.
EXIT STATUS
bk prompt returns exit status:
0 if the user said yes
1 if the user said no
2 if an error occurred
SEE ALSO
bk-citool, bk-triggers
CATEGORY
File