Added starting and containing results individual sorting
This commit is contained in:
parent
96f7a83e1e
commit
7d5e344061
@ -157,14 +157,14 @@ class SearchPassService(dbus.service.Object):
|
|||||||
path = path_join(dir_path, filename)[:-4]
|
path = path_join(dir_path, filename)[:-4]
|
||||||
password_list.append(path)
|
password_list.append(path)
|
||||||
|
|
||||||
results = list(filter(lambda p: p.startswith(name), password_list))[:5]
|
results = list(sorted(filter(lambda p: p.startswith(name), password_list)))[:5]
|
||||||
|
|
||||||
remaining = 5 - len(results)
|
remaining = 5 - len(results)
|
||||||
|
|
||||||
if remaining > 0:
|
if remaining > 0:
|
||||||
containing_results = list(filter(lambda p: name in p, password_list))[
|
containing_results = list(
|
||||||
:remaining
|
sorted(filter(lambda p: name in p, password_list))
|
||||||
]
|
)[:remaining]
|
||||||
|
|
||||||
results.extend(containing_results)
|
results.extend(containing_results)
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Name: gnome-pass-search-provider
|
Name: gnome-pass-search-provider
|
||||||
Version: 1.3.2
|
Version: 1.3.3
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Gnome Shell search provider for zx2c4/pass
|
Summary: Gnome Shell search provider for zx2c4/pass
|
||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
Url: https://git.dm1sh.ru/dm1sh/%{name}
|
Url: https://git.dm1sh.ru/dm1sh/%{name}
|
||||||
Source0: https://git.dm1sh.ru/dm1sh/%{name}/archive/%{name}-%{version}.tar.gz
|
Source0: https://git.dm1sh.ru/dm1sh/%{name}/archive/%{version}.tar.gz
|
||||||
Requires: gnome-shell
|
Requires: gnome-shell
|
||||||
Requires: pass
|
Requires: pass
|
||||||
Requires: python3-gobject
|
Requires: python3-gobject
|
||||||
@ -32,6 +32,8 @@ sed -i -e 's|LIBDIR=|LIBDIR=$RPM_BUILD_ROOT|' install.sh
|
|||||||
%{_prefix}/share/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
|
%{_prefix}/share/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 25 2025 dm1sh <me@dmitriy.icu> 1.3.3
|
||||||
|
- Added starting and containing results individual sorting
|
||||||
* Mon Nov 13 2023 dm1sh <me@dmitriy.icu> 1.3.2-1
|
* Mon Nov 13 2023 dm1sh <me@dmitriy.icu> 1.3.2-1
|
||||||
- new spec file
|
- new spec file
|
||||||
- package built with tito
|
- package built with tito
|
||||||
|
Loading…
x
Reference in New Issue
Block a user