Shell: Print paths in plain mode when stdout is not a tty
This makes e.g. `pwd | ...` behave as expected, where pwd doesn't add a hyperlink around the path.
This commit is contained in:
parent
06f7f549f2
commit
da5b1680bb
Notes:
sideshowbarker
2024-07-16 20:44:03 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/da5b1680bb Pull-request: https://github.com/SerenityOS/serenity/pull/22714
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ void Shell::setup_signals()
|
|||
|
||||
void Shell::print_path(StringView path)
|
||||
{
|
||||
if (s_disable_hyperlinks || !m_is_interactive) {
|
||||
if (s_disable_hyperlinks || !m_is_interactive || !isatty(STDOUT_FILENO)) {
|
||||
out("{}", path);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue