mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Rename "rotten" to "broken" symlinks in completions as well
Now consistent again with cd - eae9ee7f35.
This commit is contained in:
@@ -412,7 +412,7 @@ static const wchar_t *file_get_desc(int lstat_res, const struct stat &lbuf, int
|
||||
return COMPLETE_SYMLINK_DESC;
|
||||
}
|
||||
|
||||
if (err == ENOENT) return COMPLETE_ROTTEN_SYMLINK_DESC;
|
||||
if (err == ENOENT) return COMPLETE_BROKEN_SYMLINK_DESC;
|
||||
if (err == ELOOP) return COMPLETE_LOOP_SYMLINK_DESC;
|
||||
// On unknown errors we do nothing. The file will be given the default 'File'
|
||||
// description or one based on the suffix.
|
||||
@@ -453,7 +453,7 @@ static bool wildcard_test_flags_then_complete(const wcstring &filepath, const wc
|
||||
stat_res = wstat(filepath, &stat_buf);
|
||||
|
||||
if (stat_res < 0) {
|
||||
// In order to differentiate between e.g. rotten symlinks and symlink loops, we also
|
||||
// In order to differentiate between e.g. broken symlinks and symlink loops, we also
|
||||
// need to know the error status of wstat.
|
||||
stat_errno = errno;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// Description for symlink.
|
||||
#define COMPLETE_DIRECTORY_SYMLINK_DESC _(L"dir symlink")
|
||||
/// Description for Rotten symlink.
|
||||
#define COMPLETE_ROTTEN_SYMLINK_DESC _(L"rotten symlink")
|
||||
#define COMPLETE_BROKEN_SYMLINK_DESC _(L"broken symlink")
|
||||
/// Description for symlink loop.
|
||||
#define COMPLETE_LOOP_SYMLINK_DESC _(L"symlink loop")
|
||||
/// Description for socket files.
|
||||
|
||||
Reference in New Issue
Block a user