Changeset

90:3115bd81b9de

clix.archive: Be interactive when --interactive is set. --everything makes it page by itself.
author Kim Alvefur <zash@zash.se>
date Wed, 04 Jul 2012 07:51:35 +0200
parents 89:a8b63fbad807
children 91:7816f24d0fdc
files clix/archive.lua
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/clix/archive.lua	Sat Jun 30 01:00:16 2012 +0200
+++ b/clix/archive.lua	Wed Jul 04 07:51:35 2012 +0200
@@ -41,11 +41,17 @@
 				print_message(result[i]);
 			end
 			if result.last then
-				io.stderr:write "--More--"
-				if io.read"*l" then
+				local fetch_next = opts.everything;
+				if opts.interactive and not fetch_next then
+					io.stderr:write "--More--"
+					fetch_next = io.read"*l";
+				end
+				if fetch_next then
 					opts.after = result.last;
 					conn:query_archive(opts.to, opts, handle_results);
 					return
+				else
+					conn:info("Next page: --after=%s", result.last);
 				end
 			end
 			conn:close();