abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 463db77274d53d6fa7cc2644695cd78f185ed9d0
parent 6a99af6d1e23c588c1ed66600f95ea3ce408d09e
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri,  7 Mar 2014 19:53:25 +0100

Execute $ABDUCO_CMD or dvtm if no command is given

Diffstat:
abduco.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/abduco.c b/abduco.c @@ -414,7 +414,13 @@ int main(int argc, char *argv[]) { } } - if (!action || !server.session_name || (action != 'a' && !cmd)) + if (!cmd) { + cmd = (char*[]){ getenv("ABDUCO_CMD"), NULL }; + if (!cmd[0]) + cmd[0] = "dvtm"; + } + + if (!action || !server.session_name) usage(); if (tcgetattr(STDIN_FILENO, &orig_term) != -1) {