这bash
一点无关紧要,但这取决于程序包中编程的完成bash-completion
。
从文件中的一些注释中/etc/bash_completion.d/mount
:
# mount(8) completion. This will pull a list of possible mounts out of
# /etc/{,v}fstab, unless the word being completed contains a ':', which
# would indicate the specification of an NFS server. In that case, we
# query the server for a list of all available exports and complete on
# that instead.
#
# umount(8) completion. This relies on the mount point being the third
# space-delimited field in the output of mount(8)
#
此外,您还可以在主文件中找到/etc/bash_completion
以下注释,这些注释显式地讨论mount
和umount
命令:
# A meta-command completion function for commands like sudo(8), which need to
# first complete on a command, then complete according to that command's own
# completion definition - currently not quite foolproof (e.g. mount and umount
# don't work properly), but still quite useful.
#
更新:
有关的评论mount
和umount
取出命令,从bash_completion
在提交:
_command_offset: Restore compopts used by called command.
This fixes completions that rely on their compopts, most notably
mount(8).
Fixes bash-completion bug #313183.
发布于bash-completion 1.90
sudo umount
。正如enzotib所指出的,此功能已被破坏,mount
上次我检查时,它也已在Arch上被破坏。