例如,当我跑步时,guix search openjdk
我会得到一长串信息,其中大部分我不感兴趣:
name: openjdk
version: 9.181
outputs: out jdk doc
systems: x86_64-linux i686-linux
dependencies: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
+ [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
+ [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
location: gnu/packages/java.scm:1872:2
homepage: https://openjdk.java.net/projects/jdk9/
license: GPL 2+
synopsis: Java development kit
description: This package provides the Java development kit OpenJDK.
relevance: 22
name: openjdk
version: 14.0
outputs: out jdk doc
systems: x86_64-linux i686-linux
dependencies: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
+ [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
+ [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
location: gnu/packages/java.scm:2379:2
homepage: https://openjdk.java.net/projects/jdk/14
license: GPL 2+
synopsis: Java development kit
description: This package provides the Java development kit OpenJDK.
relevance: 22
...
有没有办法只显示每个软件包的名称和版本?
答案1
是的,使用小型实用程序recsel
(来自recutils
包):
$ guix search openjdk | recsel -p name,version
name: openjdk
version: 9.181
name: openjdk
version: 14.0
...