Sha256: c9e979127043fc1f954865ab1a0f64524a87b40d6a86785fc4937f7bd78f7255
Contents?: true
Size: 727 Bytes
Versions: 2
Compression:
Stored size: 727 Bytes
Contents
require "cli-console" require "highline" require "rpass/vault_provider" require "rpass/shell" module RPass class ShellCommand < Clamp::Command def execute io = HighLine.new shell = Shell.new(all_accounts) console = ::CLI::Console.new(io) console.addCommand("ls", shell.method(:ls), "List lastpass entries.") console.addCommand("print", shell.method(:print), "Print password for the specified entry, by number.") console.addCommand("cp", shell.method(:cp), "Copy password for the specified entry to clipboard.") console.addExitCommand('quit', 'Quit') console.start("%s> ", [shell.method(:prompt)]) end def all_accounts RPass.vault.accounts end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpass-0.1.1 | lib/rpass/shell_command.rb |
rpass-0.1.0 | lib/rpass/shell_command.rb |