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

Can't see start message #3973

Closed
m-nagae opened this issue Apr 20, 2017 · 13 comments
Closed

Can't see start message #3973

m-nagae opened this issue Apr 20, 2017 · 13 comments
Assignees
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@m-nagae
Copy link

m-nagae commented Apr 20, 2017

fish, version 2.5.0

iTerm2 Build 3.0.15
macOS Sierra 10.12.4

Darwin 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

xterm-256color

I always can't see this message when start fish.

Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

@faho
Copy link
Member

faho commented Apr 20, 2017

What do you mean by "always"? Under what circumstances can you or can't you see it?

This should be printed

  • When fish is interactive
  • Right before the first prompt

Is it just totally random?

@krader1961
Copy link
Contributor

You'll only see that message for interactive shells and only if you have not defined a fish_greeting function or variable. What does functions fish_greeting and set | grep fish_greeting output? What about status --is-interactive; and echo yes?

@m-nagae
Copy link
Author

m-nagae commented Apr 20, 2017

@krader1961

Thanks.
I tried that.

~/.c/fish> set | grep fish_greeting
fish_greeting

I found SET fish_greeting:\x1d in ~/.config/fish/fishd.784f43956bac.
But I haven't set it. Is this default value?

@faho
Copy link
Member

faho commented Apr 20, 2017

But I haven't set it. Is this default value?

No. That's the equivalent of set -U fish_greeting (i.e. an empty list), btw.

Are you using any third-party plugins or frameworks like oh-my-fish or fisherman? Any prompts or functions or themes you've downloaded from somewhere else?

@krader1961
Copy link
Contributor

If you simply want to see the default greeting just run set -e fish_greeting.

@m-nagae
Copy link
Author

m-nagae commented Apr 21, 2017

No. That's the equivalent of set -U fish_greeting (i.e. an empty list), btw.

I see.

Are you using any third-party plugins or frameworks like oh-my-fish or fisherman? Any prompts or functions or themes you've downloaded from somewhere else?

Yes. I using fisherman and these plugins.

$ fisher ls
agnoster		brew			cask			docker-completion	getopts			peco			spin

@krader1961
Copy link
Contributor

Neither of those plugins is likely to be the cause. It is more likely that sometime in the past you ran set -U fish_greeting; perhaps as an experiment. If you don't want to see the greeting you don't need to do anything. If you do want to see the greeting just type set -e fish_greeting. Does that answer your question?

@m-nagae
Copy link
Author

m-nagae commented Apr 21, 2017

If you simply want to see the default greeting just run set -e fish_greeting.

I did it. But I can't see it. Hmm...

$ set -e fish_greeting
$ fish
$

@m-nagae
Copy link
Author

m-nagae commented Apr 21, 2017

It is more likely that sometime in the past you ran set -U fish_greeting;

I didn't it. Because I install the fish to a clean installed MacBook Pro a while ago.

@krader1961
Copy link
Contributor

Thanks for working with us, @m-nagae, by answering our questions. I now see the problem. The __fish_config_interactive.fish has a subtle bug introduced 2016-09-10, seven months ago, by commit 90e535f. The problem is that a set -l is being done inside a if... else... end block. But the value is being used outside that block. However the "local" set means the value won't be visible outside that block.

No one has noticed this before now because most of us explicitly disable the greeting. Thanks for bringing this to our attention. I'll fix it for the 2.6.0 release.

@krader1961 krader1961 added bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases and removed needs more info labels Apr 21, 2017
@krader1961 krader1961 self-assigned this Apr 21, 2017
@krader1961 krader1961 added this to the 2.6.0 milestone Apr 21, 2017
@krader1961
Copy link
Contributor

Also, the reason you end up with a fish_greeting uvar that has no value is due to how fish evaluates set -U fish_greeting $line1$line2 when $line1 has a value and $line2 does not. Which is true due to the bug I referred to in my previous comment. In that case the composite value is the empty set due to how cartesian products work.

@m-nagae
Copy link
Author

m-nagae commented Apr 21, 2017

I see. Thank you for helping me!

I have one more things to worry about.
Fish does not work syntax highlighting by default.
Should I add an issue about it?
does-not-work-highlighting

@krader1961
Copy link
Contributor

Should I add an issue about it?

Yes, open a new issue since it is unrelated to this issue. Note, however, that I cannot tell what the problem is from the information in your last comment. What exactly do you expect to happen if you type fish at a fish prompt? When I do that the command is shown in the color red until I type the final h which makes it a valid command. There isn't any syntax to be highlighted in that simple example. Only whether the token looks like a valid command name or not.

@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