mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Make completion descriptions on symlinks to directories have their own description
darcs-hash:20061123104145-ac50b-6b48de9c46593312d9c65368d17a45999d197e4a.gz
This commit is contained in:
parent
cab80b452b
commit
deed3a63a3
@ -95,6 +95,10 @@
|
|||||||
Description for symlink
|
Description for symlink
|
||||||
*/
|
*/
|
||||||
#define COMPLETE_SYMLINK_DESC _( L"Symbolic link" )
|
#define COMPLETE_SYMLINK_DESC _( L"Symbolic link" )
|
||||||
|
/**
|
||||||
|
Description for symlink
|
||||||
|
*/
|
||||||
|
#define COMPLETE_DIRECTORY_SYMLINK_DESC _( L"Symbolic link to directory" )
|
||||||
/**
|
/**
|
||||||
Description for Rotten symlink
|
Description for Rotten symlink
|
||||||
*/
|
*/
|
||||||
@ -980,7 +984,7 @@ const wchar_t *complete_get_desc( const wchar_t *filename )
|
|||||||
{
|
{
|
||||||
if( S_ISDIR(buf2.st_mode) )
|
if( S_ISDIR(buf2.st_mode) )
|
||||||
{
|
{
|
||||||
sb_printf( get_desc_buff, L"/%lc%ls", COMPLETE_SEP, COMPLETE_SYMLINK_DESC );
|
sb_printf( get_desc_buff, L"/%lc%ls", COMPLETE_SEP, COMPLETE_DIRECTORY_SYMLINK_DESC );
|
||||||
}
|
}
|
||||||
else if( waccess( filename, X_OK ) == 0 )
|
else if( waccess( filename, X_OK ) == 0 )
|
||||||
sb_printf( get_desc_buff, L"%lc%ls", COMPLETE_SEP, COMPLETE_EXEC_LINK_DESC );
|
sb_printf( get_desc_buff, L"%lc%ls", COMPLETE_SEP, COMPLETE_EXEC_LINK_DESC );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user