alecxe,我相信这是您要寻找的一线客。
pip search django | grep -P "^django-(?=[-w]*?admin)[-w]+"
如下面评论中铬酸盐所建议的那样,您可以根据需要轻松地通过管道进行排序。
pip search django | grep -P "^django-(?=[-w]*?admin)[-w]+" | sort
让我知道您是否需要任何调整。
说明 :
在将命令
|输出重定向
pip到
<stdin>grep命令的管道之后,我们在Perl模式下输入grep
-P。这是必要的,否则我们将不被允许使用前瞻。
我们将模式锚定在字符串的开头,
^并立即将其
django-作为文字匹配。然后我们断言(超前),在这个位置上,我们将能够匹配任意数量的破折号或单词字符(包括数字和下划线),然后是文字字符串
admin。
做出此断言(这是一种验证形式)后,我们现在现在尽可能地匹配破折号和单词字符,这将使我们到达模块名称的末尾。
有几种表达方式,对于这种简单的模式,变化很大程度上取决于喜好或情绪。
如果您想更改此设置以匹配
django-包含的模式
someword,只需将其替换
admin为
someword。
输出 :
django-smoke-admin - django-smoke-admin tests that all admin pages for all registered models responds correctly (HTTP 200). django-adminskin - UNKNOWN django-admin-exporter - Simple admin actions to download/export selected items in CSV, JSON, XML, etc. django-treeadmin-fork-alt-storage - Tree UI for mptt-managed models, extracted from FeinCMS. This is a fork with support for alternative storage engines django-relatedadminwidget - Get edit and delete links in your django admin. A utility class to let your model admins inherit from. django-admin-langswitch - Adds easy language switch in admin django-authy-admin - A drop in replacement for django's default admin site that provides two-factor authentication via authy's REST API. django-frontendadmin - A a set of templatetags to allow an easy and unobstrusive way to edit model-data in the frontend of your page. django-admin-app-names-singleton - Django admin enhancer django-mobileadmin - The Django admin interface for mobile devices.
(列表继续。)
顺便说一句,查看点子搜索文档,如果没有管道,我看不到这样做的方法。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)