1
0
mirror of git://git.suckless.org/surf synced 2024-12-13 18:25:39 +00:00

Dropping -f/-u arguments as suggested by Kai Hendry

This commit is contained in:
Enno Boland (tox) 2009-09-06 13:27:28 +02:00
parent 844d414525
commit 2448c967f6
2 changed files with 11 additions and 19 deletions

10
surf.1
View File

@ -4,8 +4,7 @@ surf \- simple webkit-based browser
.SH SYNOPSIS .SH SYNOPSIS
.B surf .B surf
.RB [ \-ehvx ] .RB [ \-ehvx ]
.RB [ \-f " FILE"] .RB "URI"
.RB [ \-u " URI"]
.SH DESCRIPTION .SH DESCRIPTION
surf is a simple Web browser based on WebKit/GTK+. It is able surf is a simple Web browser based on WebKit/GTK+. It is able
to display websites and follow links. It supports the XEmbed protocol to display websites and follow links. It supports the XEmbed protocol
@ -17,16 +16,9 @@ one can point surf to another URI by setting its XProperties.
Prints xid to standard output and waits until an application reparents the Prints xid to standard output and waits until an application reparents the
window. window.
.TP .TP
.B \-f FILE
Sets the browser's URI to FILE. It is also possible to read from standard
input.
.TP
.B \-h .B \-h
Prints usage information to standard output, then exits. Prints usage information to standard output, then exits.
.TP .TP
.B \-u URI
Sets the browser's URI.
.TP
.B \-v .B \-v
Prints version information to standard output, then exits. Prints version information to standard output, then exits.
.TP .TP

20
surf.c
View File

@ -524,7 +524,7 @@ titlechange(WebKitWebView *v, WebKitWebFrame *f, const gchar *t, Client *c) {
void void
usage() { usage() {
fputs("surf - simple browser\n", stderr); fputs("surf - simple browser\n", stderr);
die("usage: surf [-e] [-x] [-u uri] [-f file]\n"); die("usage: surf [-e] [-x] [uri]\n");
} }
void void
@ -564,21 +564,21 @@ int main(int argc, char *argv[]) {
showxid = TRUE; showxid = TRUE;
embed = TRUE; embed = TRUE;
break; break;
case 'u':
c = newclient();
loaduri(c, optarg);
break;
case 'f':
c = newclient();
loadfile(c, optarg);
break;
case 'v': case 'v':
die("surf-"VERSION", © 2009 surf engineers, see LICENSE for details\n"); die("surf-"VERSION", © 2009 surf engineers, see LICENSE for details\n");
break; break;
default: default:
usage(); usage();
} }
if(optind != argc) if(optind + 1 == argc) {
c = newclient();
if(strchr("./", argv[optind][0]) || strcmp("-", argv[optind]) == 0)
loadfile(c, argv[optind]);
else
loaduri(c, argv[optind]);
}
else if(optind != argc)
usage(); usage();
if(!clients) if(!clients)
newclient(); newclient();