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

Default prompt / __fish_print_pipestatus can't handle TERM=dumb #7904

zanchey opened this issue Apr 6, 2021 · 1 comment

Default prompt / __fish_print_pipestatus can't handle TERM=dumb #7904

zanchey opened this issue Apr 6, 2021 · 1 comment


Copy link

zanchey commented Apr 6, 2021

fish, version 3.2.1-90-ge56d8a8e5

env -i HOME=(mktemp -d) TERM=dumb ~/prefix/bin/fish
Welcome to fish, the friendly interactive shell          
Type help for instructions on how to use fish                                                                                  
error: missing argument                      
in function '__fish_print_pipestatus' with arguments '\[ \] \| 0'
        called on line 1 of file /home/wheel/zanchey/prefix/share/fish/functions/
in command substitution      
        called on line 33 of file /home/wheel/zanchey/prefix/share/fish/functions/
in function 'fish_prompt'        
in command substitution

This is because __fish_print_pipestatus gets called with a number of set_color command substitutions as arguments, which are empty when TERM is "dumb".

@zanchey zanchey added this to the fish-future milestone Apr 6, 2021
Copy link

faho commented Apr 6, 2021

This is a specific manifestation of #5443 - if set_color printed something sensible when run with no arguments (or TERM=dumb) this wouldn't be a problem.

I still have no idea what, tho - some no-op escape sequence would be great. The alternative is to have some way to quote a command substitution - "$(set_color)" would just expand to the same as "", an empty string.

Still worth fixing here, tho, and ideally in __fish_print_pipestatus. We might just want to use argparse and pass the colors as options, this current argument passing scheme is awkward.

@faho faho closed this as completed in 6aade38 Apr 25, 2021
@faho faho modified the milestones: fish-future, fish 3.3.0 Apr 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

2 participants