我知道这有点晚了,但是这篇文章是与在Debian中寻找替代品相关的热门搜索之一。
使用update-alternatives
这里的问题是,据我所知,它只会显示您已安装的选件(其手册页相当稀疏)。
要回答标题中提出的问题,即查找提供替代方法的所有可用软件包(无论是否安装),您可以使用:
aptitude search '?provides(pattern)'
也可以缩写为:
aptitude search '~Ppattern'
pattern
您要寻找的替代品的全部或部分在哪里?在的特定情况下vi
,这实际上不起作用。如果您使用nvi
和检查软件包,并vim
使用aptitude show
或apt-cache show
,则将看不到在“提供:”部分中未列出“ vi”。实际上,nvi的描述完全缺少该部分。
但是,它对于其他替代方法也相当有效,例如editor
:
$ aptitude search '~Peditor'
p deutex - composition tool for doom-style WAD files
p edbrowse - /bin/ed-alike webbrowser written in C
p emacs24 - GNU Emacs editor (with GTK+ GUI support)
p emacs24-lucid - GNU Emacs editor (with Lucid GUI support)
p emacs24-nox - GNU Emacs editor (without GUI support)
p fte-console - Text editor for programmers - console edi
p fte-terminal - Text editor for programmers - version for
p fte-xwindow - Text editor for programmers - X Window Sy
p jed - editor for programmers (textmode version)
p jove - Jonathan's Own Version of Emacs - a compa
p jupp - user friendly full screen text editor
p le - Text editor with block and binary operati
p ledit - line editor for interactive programs
p levee - very small vi clone
p mg - microscopic GNU Emacs-style editor
p nano - small, friendly text editor inspired by P
p nano-tiny - small, friendly text editor inspired by P
p ne - easy-to-use and powerful text editor
p pluma - official text editor of the MATE desktop
p rlfe - Front-end using readline to "cook" input
p rlwrap - readline feature command line wrapper
p scite - Lightweight GTK-based Programming Editor
p vigor - nvi with the evil paperclip
p vile - VI Like Emacs - vi work-alike
p vim - Vi IMproved - enhanced vi editor
p vim-athena - Vi IMproved - enhanced vi editor - with A
p vim-gnome - Vi IMproved - enhanced vi editor - with G
i vim-gtk - Vi IMproved - enhanced vi editor - with G
p vim-nox - Vi IMproved - enhanced vi editor - with s
i vim-tiny - Vi IMproved - enhanced vi editor - compac
p xjed - editor for programmers (x11 version)
p xul-ext-password-editor - edit password manager entries in Mozilla
p xvile - VI Like Emacs - vi work-alike (X11)
即使这不是完美的,aptitude
也具有难以置信的灵活搜索功能,该功能通常使您可以解决软件包未正确列出其提供的替代方案的问题-例如,"~seditors ~dvi\s"
用作搜索模式将在“编辑器”部分列出其所有软件包描述包含字符串“ vi”。
另一种选择是使用Debian的软件包网站,右侧部分列出了类似的软件包。
aps ~Peditor
?如果aps
打算将其作为适合性的捷径,可以,但是请不要在答案中使用它,这只会使所有人感到困惑。另外,如果您认为缺少提供,则可以针对相应的软件包提交错误报告。