forked from github/abduco
Print session list if neither action nor session name was given
In particular $ abduco -e ^q will now also print the session list which is useful if the default detach key is changed by means of a shell alias. Closes #10
This commit is contained in:
parent
f7b65db3ca
commit
598fdc396f
4
abduco.c
4
abduco.c
|
|
@ -575,8 +575,6 @@ int main(int argc, char *argv[]) {
|
|||
char **cmd = NULL, action = '\0';
|
||||
server.name = basename(argv[0]);
|
||||
gethostname(server.host+1, sizeof(server.host) - 1);
|
||||
if (argc == 1)
|
||||
exit(list_session());
|
||||
|
||||
while ((opt = getopt(argc, argv, "aAclne:frv")) != -1) {
|
||||
switch (opt) {
|
||||
|
|
@ -624,6 +622,8 @@ int main(int argc, char *argv[]) {
|
|||
cmd[0] = "dvtm";
|
||||
}
|
||||
|
||||
if (!action && !server.session_name)
|
||||
exit(list_session());
|
||||
if (!action || !server.session_name)
|
||||
usage();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue