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
terrycloth opened this Issue Jul 24, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@terrycloth
Contributor

terrycloth 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

This comment has been minimized.

Show comment
Hide comment
@floam

floam Jul 24, 2016

Member

This is #1401.

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

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 this to the next-2.x milestone Jul 24, 2016

@floam floam self-assigned this Jul 24, 2016

@floam floam closed this in 3d0ea5f Jul 24, 2016

floam added a commit that referenced this issue Jul 24, 2016

Only show fish greeting for interactive logins
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
@terrycloth

This comment has been minimized.

Show comment
Hide comment
@terrycloth

terrycloth Jul 24, 2016

Contributor

Wow, that was fast. Thanks!

Contributor

terrycloth commented Jul 24, 2016

Wow, that was fast. Thanks!

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 24, 2016

Member

This got reverted as 88688d0

Member

ridiculousfish commented Jul 24, 2016

This got reverted as 88688d0

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 24, 2016

Member

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

Looks like it was a little too fast :)

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

This comment has been minimized.

Show comment
Hide comment
@floam

floam Jul 25, 2016

Member

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!

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

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 25, 2016

Member

Ah, that makes sense. No harm done.

Member

ridiculousfish commented Jul 25, 2016

Ah, that makes sense. No harm done.

@floam floam closed this in b77e2a6 Jul 31, 2016

@krader1961 krader1961 modified the milestones: fish 2.4.0, next-2.x Sep 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment