projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60970be
)
do nothing with blank lines, exit on EOF
author
Art Cancro
<ajc@citadel.org>
Wed, 30 Oct 2019 19:26:05 +0000
(15:26 -0400)
committer
Art Cancro
<ajc@citadel.org>
Wed, 30 Oct 2019 19:26:05 +0000
(15:26 -0400)
ctdlsh/main.c
patch
|
blob
|
history
diff --git
a/ctdlsh/main.c
b/ctdlsh/main.c
index 00ca50895a0ce2976b545337b4aed6def1279e3d..69d7f777ba1c0ff6803494f475f1fe5d51132419 100644
(file)
--- a/
ctdlsh/main.c
+++ b/
ctdlsh/main.c
@@
-146,9
+146,11
@@
void do_main_loop(int server_socket)
rl_attempted_completion_function = ctdlsh_completion;
/* Here we go ... main command loop */
- while ( (cmd = readline(prompt)) , ((cmd) && (*cmd)) ) {
- add_history(cmd);
- ret = do_one_command(server_socket, cmd);
+ while ( (cmd = readline(prompt)) , cmd ) {
+ if (*cmd) {
+ add_history(cmd);
+ ret = do_one_command(server_socket, cmd);
+ }
free(cmd);
}
}