mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ void Shell::setup_signals()
|
||||||
|
|
||||||
void Shell::print_path(StringView path)
|
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);
|
out("{}", path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue