[xmonad] [xmonad-contrib] XMonad.Prompt.Pass patch
Joachim Breitner
mail at joachim-breitner.de
Thu Dec 18 22:25:51 UTC 2014
Dear ardumont,
I started using pass and was about to implement a prompt on my own when
I noticed that you already did something in that direction. But from
reading the code, I have a some worries:
I’d expect the
getPasswords :: String -> IO [String]
getPasswords passwordStoreDir = liftM (map takeBaseName) $ getDirectoryContents passwordStoreDir
to break if the passwords are stored in subdirectories. I believe you
need to recursively traverse the directory.
It would be cleaner if you could simply ask pass for the list of
passwords, but that does not seem to be possible. Maybe you should
contact the author and suggest a new parameter to "pass list" that would
change the output to be a simple list, instead of the tree output.
Also, code like
selectPassword passLabel = spawn $ "pass --clip " ++ passLabel
could be a problem if the password label contains shell characters.
You probably want to use safeSpawn from XMonad.Util.Run.
Greetings,
Joachim
--
Joachim “nomeata” Breitner
mail at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20141218/9a3a3df3/attachment.sig>
More information about the xmonad
mailing list