xref: /netbsd/usr.bin/leave/leave.1 (revision bf9ec67e)
1.\"	$NetBSD: leave.1,v 1.9 2002/01/21 11:42:55 wiz Exp $
2.\"
3.\" Copyright (c) 1980, 1990, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"	@(#)leave.1	8.3 (Berkeley) 4/28/95
35.\"
36.Dd January 19, 2002
37.Dt LEAVE 1
38.Os
39.Sh NAME
40.Nm leave
41.Nd remind you when you have to leave
42.Sh SYNOPSIS
43.Nm
44.Sm off
45.Oo
46.Op Cm \&+
47.Ns Ar hhmm
48.Oc
49.Sm on
50.Sh DESCRIPTION
51.Nm
52waits until the specified time (within the next 12 hours), then
53reminds you that you have to leave by writing to the TTY that you
54executed
55.Nm
56on.
57.Pp
58You are reminded 5 minutes and 1 minute before the actual
59time, at the time, and every minute thereafter.
60When you log off,
61.Nm
62exits just before it would have
63printed the next message.
64.Sh OPTIONS
65.Bl -tag -width flag
66.It Ar hhmm
67The time of day is in the form
68.Ar hhmm
69where
70.Ar hh
71is a time in
72hours (on a 12 or 24 hour clock), and
73.Ar mm
74are minutes.
75.Pp
76However, all times are converted to a 12 hour clock, and assumed to
77be in the next 12 hours.
78An attempt to set an alarm for farther into the future will be truncated
79to within the next 12 hours.
80.It Cm \&+
81If the time is preceded by
82.Ql Cm \&+ ,
83the alarm will go off in hours and minutes
84from the current time.
85.El
86.Pp
87If no argument is given,
88.Nm
89prompts with "When do you have to leave?"
90A reply of newline causes
91.Nm
92to exit,
93otherwise the reply is assumed to be a time.
94This form is suitable for inclusion in a
95.Pa ~/.login
96or
97.Pa ~/.profile .
98.Sh SEE ALSO
99.Xr calendar 1 ,
100.Xr csh 1 ,
101.Xr sh 1
102.Sh HISTORY
103The
104.Nm
105command appeared in
106.Bx 3.0 .
107.Sh BUGS
108In the modern age with
109.Xr X 1
110and window multiplexing programs like
111.Xr window 1
112and
113.Xr screen 1 ,
114the
115.Nm
116command's reminders and admonitions might not be seen if the user
117has the window where
118.Nm
119was started minimized or obscured.
120.Pp
121This all begs for a more general user notifications system to be implemented.
122