LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 645|回复: 2

aptitude pattern?

[复制链接]
发表于 2010-3-5 17:00:04 | 显示全部楼层 |阅读模式
无意中看了下 aptitude 的文档,发现它好强大。不过它的 pattern 弄不明白。

aptitude search '~d(window manager)'
搜索描述中包含 window 和 manager 软件

但输入不过两行,
$aptitude search '~d(window manager)'
p   kde-window-manager              - the KDE 4 window manager (KWin)           
p   matchbox-window-manager         - window manager for resource-limited system

事实上 ion3 的描述中包含 window 和 manager
$aptitude show dwm
Package: dwm
New: yes
State: not installed
Version: 5.7.2-1
Priority: optional
Section: x11
Maintainer: Debian Suckless Maintainers <suckless@lists.debian-maintainers.org>
Uncompressed Size: 119k
Depends: libc6 (>= 2.2.5), libx11-6, libxinerama1
Recommends: dwm-tools, x11-xserver-utils
Provides: x-window-manager
Description: dynamic window manager
dwm is a minimalistic window manager. It manages windows in tiling and floating modes. Either mode can
be applied dynamically, depending on the application in use and the task performed.

In tiling mode windows are managed in a master and stacking column. The master column contains the
window which needs most attention at a time, whereas the stacking column contains all other windows in a
stack. Dialog windows are managed floating, however.

In floating mode windows can be resized and moved freely. Windows are grouped by tags. All windows with
a specific tag can be viewed at a time. But each window may contain more than one tag, which makes it
visible in several views.

dwm consists of a small status bar which reads the text displayed from standard input, if written. It
draws 1-pixel borders around windows to indicate the focus state. Unfocused windows contain a small bar
in front of the window displaying the tags and the window title.

Please notice that dwm is currently customized through editing its source code, so you probably want to
build your own dwm packages. This package is compiled with the default configuration and should just
give you an idea about what dwm brings to your desktop.
Homepage: http://www.suckless.org/

这是怎么搞的。
发表于 2010-3-5 20:22:29 | 显示全部楼层
你应该用
aptitude search '~d"window manager"'
或者完整形式:
aptitude search '?description("window manager")'

当你的pattern使用简写形式的时候,括号将被看作是正规表达式的元字符;
另外,因为搜索词中包含空格,所以需要双引号(或用 \ 转义符)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-3-5 21:01:20 | 显示全部楼层
Post by clinif;2073366

当你的pattern使用简写形式的时候,括号将被看作是正规表达式的元字符;


原来是这么回事,谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表