Improvements.

This commit is contained in:
J. Nathanael Philipp 2019-09-19 14:59:18 +02:00
parent 1e53479189
commit 2ca2ad54c7
No known key found for this signature in database
GPG Key ID: B1734342CFA62253
2 changed files with 9 additions and 8 deletions

View File

@ -43,7 +43,7 @@ The [pass-otp](https://github.com/tadfisher/pass-otp) extension is supported. Se
# Fields
To copy other values than the password in the first line from a pass file, start the search with `:NAME search...`. This requieres `GPaste`.
To copy other values than the password in the first line from a pass file, start the search with `:NAME search...`. The field name must be a full but case insensitive match. This requires `GPaste`.
For example with a pass file like:
```

View File

@ -25,17 +25,18 @@
# Copyright (C) 2012 Red Hat, Inc.
# Author: Luke Macken <lmacken@redhat.com>
from fuzzywuzzy import process, fuzz
from gi.repository import GLib
from os import getenv, walk
from os.path import expanduser, join as path_join
import dbus
import dbus.glib
import dbus.service
import re
import subprocess
from os import getenv, walk
from os.path import expanduser, join as path_join
from gi.repository import GLib
from fuzzywuzzy import process, fuzz
# Convenience shorthand for declaring dbus interface methods.
# s.b.n. -> search_bus_name
search_bus_name = 'org.gnome.Shell.SearchProvider2'
@ -122,8 +123,8 @@ class SearchPassService(dbus.service.Object):
if match:
password = match.group('value')
else:
raise RuntimeError(f'The field {field} not found in pass' +
' file.')
raise RuntimeError(f'The field {field} was not found in ' +
'the pass file.')
else:
password = output.split('\n', 1)[0]