1pass.lua
changeset 7 682d7ea1e7f3
parent 6 b7f19e0599db
child 8 eada72719d17
--- a/1pass.lua	Wed Dec 18 00:24:01 2013 -0500
+++ b/1pass.lua	Thu Dec 19 09:27:25 2013 -0500
@@ -118,11 +118,18 @@
 
 -- Mainline!
 
+--for i,v in ipairs(argv) do
+--    print("argv[" .. i .. "] = " .. v)
+--end
+
 local basedir = "1Password/1Password.agilekeychain/data/default"  -- !!! FIXME
 
-showHint(basedir)
-io.write("password: ")
-local password = io.read("*l")
+local password = argv[3]
+if password == nil then
+    showHint(basedir)
+    io.write("password: ")
+    password = io.read("*l")
+end
 
 if loadKey(basedir, "SL5", password) == nil then
     print("wrong password?\n")