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

fish scripts always print the $fish_greeting welcome message before the "read" command prompt #3261

Closed
2 tasks done
audreytoskin opened this issue Jul 24, 2016 · 6 comments
Closed
2 tasks done
Assignees
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@audreytoskin
Copy link
Contributor

audreytoskin commented Jul 24, 2016

  • Have you checked if problem occurs with fish 2.3.1?
  • Tried fish without third-party customizations (check sh -c 'env HOME=$(mktemp -d) fish')?

fish version installed (fish --version):
2.3.1

OS/terminal used:
Fedora 24 (64-bit) / GNOME Terminal 3.20.2

I'm writing a simple script that uses the read command to get info from the user before continuing. Every time the script runs, when it gets to the first read line, it prints the $fish_greeting, which I find a little distracting.

The only workaround I've been able to figure out is to set fish_greeting to an empty string -- however, even when I use set --local, that seems to permanently remove the fish greeting for all future sessions, not just when running the script. Some users of my script may not like that.

Here's an example script that consistently prints the fish greeting when it reaches the read line.

#!/usr/bin/fish
echo "What's your name?"
read name
echo "Hello, $name!"
@floam
Copy link
Member

floam commented Jul 24, 2016

This is #1401.

It looks like the fix for it in e1f623f is no longer present.

@floam floam added regression Something that used to work, but was broken, especially between releases bug Something that's not working as intended labels Jul 24, 2016
@floam floam added this to the next-2.x milestone Jul 24, 2016
@floam floam self-assigned this Jul 24, 2016
@floam floam closed this as completed in 3d0ea5f Jul 24, 2016
floam pushed a commit that referenced this issue Jul 24, 2016
This is a regression introduced by 834ebef
Bolster with a check for only login sessions too -- hopefully makes it
less annooying on subshells in general.

Fixes #3261
@audreytoskin
Copy link
Contributor Author

Wow, that was fast. Thanks!

@ridiculousfish
Copy link
Member

This got reverted as 88688d0

@ridiculousfish
Copy link
Member

ridiculousfish commented Jul 24, 2016

There was some thrashing here. I reverted all the way back to d252704

Looks like it was a little too fast :)

@floam
Copy link
Member

floam commented Jul 25, 2016

Aye ye ye: more like "trashing":.. I literally thought origin on that Windows machine I was using git on (without fish handy) was my remote but it was fish-shell (I normally make it
'upstream').

I was trying to essentially stash the commit log and break __fish_config_interactive such that I wouldn't forget about actually testing that one with fish available when I got home. I even pushed a second time when it didn't seem to take. I didn't realize for a while that it was actually to fish-shell/master. I'm sorry!

@ridiculousfish
Copy link
Member

Ah, that makes sense. No harm done.

@floam floam closed this as completed in b77e2a6 Jul 31, 2016
@krader1961 krader1961 modified the milestones: fish 2.4.0, next-2.x Sep 3, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 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

4 participants