mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-24 05:41:14 -03:00
Fix highlighting of redirection to - (close file descriptor)
Fixes #6092
This commit is contained in:
committed by
Mahmoud Al-Qudsi
parent
77ef2ef6c3
commit
0ecfc25961
@@ -992,8 +992,12 @@ void highlighter_t::color_redirection(tnode_t<g::redirection> redirection_node)
|
||||
path_apply_working_directory(target, this->working_directory);
|
||||
switch (*redirect_type) {
|
||||
case redirection_type_t::fd: {
|
||||
int fd = fish_wcstoi(target.c_str());
|
||||
target_is_valid = !errno && fd >= 0;
|
||||
if (target == L"-") {
|
||||
target_is_valid = true;
|
||||
} else {
|
||||
int fd = fish_wcstoi(target.c_str());
|
||||
target_is_valid = !errno && fd >= 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case redirection_type_t::input: {
|
||||
|
||||
Reference in New Issue
Block a user