Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question Mark folder icon on title bar with macOS's Terminal.app, fish 3.0 #5758

Closed
LdBeth opened this issue Mar 21, 2019 · 7 comments
Closed
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@LdBeth
Copy link

LdBeth commented Mar 21, 2019

After an update my title bar comes with a question marked folder icon.

螢幕快照 2019-03-21 下午4 10 03

Related to this thread https://apple.stackexchange.com/questions/75751/why-does-the-folder-icon-in-my-terminal-have-a-question-mark-overlaid

The question mark (and disabled popup menu items) indicates that Terminal thinks the working directory is on a remote computer, and therefore you cannot navigate to it in Finder using the popup menu. If you look at the last item in the popup menu (Command-Click on the “proxy” icon) you'll see the computer/host that Terminal thinks the working directory is on. You should find that it is not the computer’s current name.

My hostname command gives a XXX.hsd1.ca.comcast.net, rather than typical XXX.local due to my ISP's config, possibly causes the problem. Using system's default bash has no such a problem.

I'm using the prebuilt binary from https://pkgsrc.joyent.com, the version number is 3.0.0 according to package description, although echo $version gives unknown. macOS Mojave version 10.14.3
Can be reproduced using the AppleScript bundle (version 3.0.2-1-g6f940d72d) downloaded from homepage.
Not reproducible with locally compiled 2.7.1 version, which gives an expected normal icon.

螢幕快照 2019-03-21 下午4 11 10

I suppose the function informs the terminal about CWD has changed since 3.0 but no longer works with this corner case.

@floam
Copy link
Member

floam commented Mar 22, 2019

That question mark appears when a bad path is reported to the terminal through the OSC 7 mechanism. What path do you see if you right click and hit Show Inspector? It'll be listed after Directory:

@floam
Copy link
Member

floam commented Mar 22, 2019

(Just to confirm if it's really the hostname or maybe something else is going on.)

@floam
Copy link
Member

floam commented Mar 22, 2019

Also, giving the Directory: from 2.7.1 to compare would be handy.

@faho
Copy link
Member

faho commented Mar 22, 2019

Changes to the OSC 7 handling since 2.7.1:

  • 920be02, which uses $hostname instead of the hostname command.

  • 5faa425, which disables it in iTerm.

I imagine if $hostname is different from what hostname outputs that could trigger this.

@LdBeth
Copy link
Author

LdBeth commented Mar 23, 2019

That question mark appears when a bad path is reported to the terminal through the OSC 7 mechanism. What path do you see if you right click and hit Show Inspector? It'll be listed after Directory:

it's file://XXXXXXX-XXXXX.hsd1.ca.comcast.../Users/ldbeth.

Changes to the OSC 7 handling since 2.7.1:

  • 920be02, which uses $hostname instead of the hostname command.
  • 5faa425, which disables it in iTerm.

I imagine if $hostname is different from what hostname outputs that could trigger this.

You're right.
echo $hostname gives XXXXXXX-XXXXX.hsd1.ca.comcast...
while hostname gives XXXXXXX-XXXXX.hsd1.ca.comcast.net.

So it seems my hostname somehow get truncated because it's too long. 😭

@floam floam added the bug Something that's not working as intended label Mar 23, 2019
@floam
Copy link
Member

floam commented Mar 23, 2019

I have no idea why we're truncating at 32 characters. Up to 255 should be fine.

env_universal_common.cpp:

/// Maximum length of hostname. Longer hostnames are truncated.
#define HOSTNAME_LEN 32

@floam floam closed this as completed in a2a9709 Mar 23, 2019
@floam
Copy link
Member

floam commented Mar 23, 2019

Okay, this should work correctly for you in git master.

@floam floam added the regression Something that used to work, but was broken, especially between releases label Mar 23, 2019
@floam floam added this to the fish 3.1.0 milestone Mar 23, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Projects
None yet
Development

No branches or pull requests

3 participants