mseq: add -c to override .

pull/2/head
Christian Neukirchen 8 years ago
parent c9c5346e63
commit f34a284b42

@ -7,6 +7,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl fr .Op Fl fr
.Op Fl c Ar file
.Ar msgs\ ... .Ar msgs\ ...
.Nm .Nm
.Fl S .Fl S
@ -45,6 +46,10 @@ If standard output is not a terminal, the new sequence is also printed.
.Pp .Pp
The options are as follows: The options are as follows:
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl c Ar file
Behave as if
.Ar file
was the current message.
.It Fl f .It Fl f
Fix non-existing filenames by searching for a message with the same Fix non-existing filenames by searching for a message with the same
Maildir id (but different flags). Maildir id (but different flags).
@ -63,14 +68,19 @@ and exit.
.El .El
.Sh ENVIRONMENT .Sh ENVIRONMENT
.Bl -tag -width Ds .Bl -tag -width Ds
.It Ev MAILSEQ
File were the sequence is stored.
(Default:
.Pa ~/.mblaze/seq )
.It Ev MAILCUR .It Ev MAILCUR
Symbolic link referring to the current message. Symbolic link referring to the current message.
(Default: (Default:
.Pa ~/.mblaze/cur ) .Pa ~/.mblaze/cur )
.It Ev MAILDOT
When set, overrides the current message.
(Prefer using
.Fl c
instead.)
.It Ev MAILSEQ
File were the sequence is stored.
(Default:
.Pa ~/.mblaze/seq )
.El .El
.Sh EXIT STATUS .Sh EXIT STATUS
.Ex -std .Ex -std

@ -251,8 +251,9 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
int c; int c;
while ((c = getopt(argc, argv, "frAC:S")) != -1) while ((c = getopt(argc, argv, "c:frAC:S")) != -1)
switch(c) { switch(c) {
case 'c': setenv("MAILDOT", optarg, 1); break;
case 'f': fflag = 1; break; case 'f': fflag = 1; break;
case 'r': rflag = 1; break; case 'r': rflag = 1; break;
case 'A': Sflag = Aflag = 1; break; case 'A': Sflag = Aflag = 1; break;
@ -261,7 +262,7 @@ main(int argc, char *argv[])
default: default:
usage: usage:
fprintf(stderr, fprintf(stderr,
"Usage: mseq [-fr] [msgs...]\n" "Usage: mseq [-fr] [-c file] [msgs...]\n"
" mseq -S [-fr] < sequence\n" " mseq -S [-fr] < sequence\n"
" mseq -A [-fr] < sequence\n" " mseq -A [-fr] < sequence\n"
" mseq -C msg\n" " mseq -C msg\n"

Loading…
Cancel
Save