Macos Mac终端自动完成提示文件不在当前目录中

Macos Mac终端自动完成提示文件不在当前目录中,macos,terminal,autocomplete,Macos,Terminal,Autocomplete,无论术语promt在文件系统中的何处,它都只建议来自bin或sbin dir的可执行文件 看看这个: Last login: Sun Apr 26 15:24:57 on ttys004 You have mail. box:~ mee$ A AppleFileServer AssetCacheLocatorUtil AssetCacheManagerUtil AssetCacheTetheratorUtil box:~ mee$ which AppleF

无论术语promt在文件系统中的何处,它都只建议来自bin或sbin dir的可执行文件

看看这个:

Last login: Sun Apr 26 15:24:57 on ttys004
You have mail.
box:~ mee$ A
AppleFileServer           AssetCacheLocatorUtil     AssetCacheManagerUtil     AssetCacheTetheratorUtil  
box:~ mee$ which AppleFileServer 
/usr/sbin/AppleFileServer
box:~ mee$ 
Display all 2636 possibilities? (y or n)
box:~ mee$ cd ~/Desktop/wp-content/
box:wp-content mee$ ls
index.php   languages   plugins     themes      upgrade     uploads
box:wp-content mee$ 
Display all 2636 possibilities? (y or n)
box:wp-content mee$ A
AppleFileServer           AssetCacheLocatorUtil     AssetCacheManagerUtil     AssetCacheTetheratorUtil  

编辑:我已经创建了一个新的管理员用户,以查看问题是否仍然存在,但同样的错误也存在。

如果您正在完成可执行文件,这与预期一样;完成遵循路径。如果要在本地目录中完成,可能必须在点击完成键之前键入
/
,因为路径变量中经常会排除


在这种情况下,完成是“聪明”的,因为它把它认为是上下文的东西,并用它来确定你想要什么。在本例中,在行首,它认为您想要完成一个可以实际执行的命令,因此它只会在路径中找到内容。

如果您正在完成可执行文件,这是意料之中的;完成遵循路径。如果要在本地目录中完成,可能必须在点击完成键之前键入
/
,因为路径变量中经常会排除

在这种情况下,完成是“聪明”的,因为它把它认为是上下文的东西,并用它来确定你想要什么。在本例中,在行的开头,它认为您想要完成一个可以实际执行的命令,因此它只会在路径中查找内容