mirror of https://github.com/martanne/abduco
Merge 8d0487a0c5 into 15ae398ea5
This commit is contained in:
commit
5efde80b0f
53
abduco.c
53
abduco.c
|
|
@ -592,32 +592,35 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
if (server.session_name)
|
if (server.session_name)
|
||||||
usage();
|
usage();
|
||||||
switch (argv[arg][1]) {
|
int c = 0;
|
||||||
case 'a':
|
while(argv[arg][++c]) {
|
||||||
case 'A':
|
switch (argv[arg][c]) {
|
||||||
case 'c':
|
case 'a':
|
||||||
case 'n':
|
case 'A':
|
||||||
action = argv[arg][1];
|
case 'c':
|
||||||
break;
|
case 'n':
|
||||||
case 'e':
|
action = argv[arg][c];
|
||||||
if (arg + 1 >= argc)
|
break;
|
||||||
|
case 'e':
|
||||||
|
if (arg + 1 >= argc)
|
||||||
|
usage();
|
||||||
|
char *esc = argv[++arg];
|
||||||
|
if (esc[0] == '^' && esc[1])
|
||||||
|
*esc = CTRL(esc[1]);
|
||||||
|
KEY_DETACH = *esc;
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
force = true;
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
client.readonly = true;
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
puts("abduco-"VERSION" © 2013-2015 Marc André Tanner");
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
default:
|
||||||
usage();
|
usage();
|
||||||
char *esc = argv[++arg];
|
}
|
||||||
if (esc[0] == '^' && esc[1])
|
|
||||||
*esc = CTRL(esc[1]);
|
|
||||||
KEY_DETACH = *esc;
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
force = true;
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
client.readonly = true;
|
|
||||||
break;
|
|
||||||
case 'v':
|
|
||||||
puts("abduco-"VERSION" © 2013-2015 Marc André Tanner");
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
default:
|
|
||||||
usage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue