Browse files

show list tweaks

  • Loading branch information...
1 parent 9568700 commit 278582ae5c21c1c29b9775050a6dd1c0c4fcc834 @janlelis committed Jan 18, 2012
Showing with 7 additions and 7 deletions.
  1. +2 −3 bin/pws
  2. +3 −2 features/misc.feature
  3. +2 −2 lib/pws.rb
View
5 bin/pws
@@ -19,7 +19,7 @@ begin
puts \
<<HELP
- #{Paint['s', :bold]} / show / list
+ #{Paint['s', :bold]} / show / list / status
Lists all available password entries.
#{Paint['g', :bold]} / get / entry / copy ( name, seconds = 5 )
@@ -53,8 +53,7 @@ HELP
puts "pws #{PWS::VERSION} by " + Paint["J-_-L", :bold] + " <https://github.com/janlelis/pws>"
else # redirect to safe
if PWS.public_instance_methods(false).include?(action)
- pws = PWS.new
- pws.send action, *args
+ PWS.new.send action, *args
else
pa "Unknown command: #{action}\nPlease see `pws help` for a list of available commands!", :red
end
View
5 features/misc.feature
@@ -14,7 +14,8 @@ Feature: Misc
Scenario: I am calling a task that does not exist
Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
- When I run `pws pws` interactively
- And the output should contain "Unknown pws command: 'pws'"
+ When I run `pws blubb` interactively
+ And the output should contain "Unknown command"
+ And the output should contain "blubb"
View
4 lib/pws.rb
@@ -101,11 +101,11 @@ def show
pa %[No passwords stored at #{@pw_file}, yet.], :red
else
puts Paint["Entries", :underline] + %[ in ] + @pw_file
- puts @pw_data.keys.map{ |key| %[- #{key}\n] }.join
+ puts @pw_data.keys.sort.map{ |key| %[- #{key}\n] }.join
end
return true
end
- aliases_for :show, :s, :list
+ aliases_for :show, :s, :list, :status
# Changes the master password
def master(password = nil)

0 comments on commit 278582a

Please sign in to comment.