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

put curses/terminfo vars into the environment #3109

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@krader1961
Copy link
Contributor

krader1961 commented Jun 3, 2016

We need to actually export the curses/terminfo env vars in order for
setupterm() to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.

This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set TERM, TERMINFO, and
TERMINFO_DIRS in config.fish or similar config file and have them be
honored by fish.


  • User documentation changes unnecessary
  • Release notes updated
put curses/terminfo vars into the environment
We need to actually export the curses/terminfo env vars in order for
`setupterm()` to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.

This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set `TERM`, `TERMINFO`, and
`TERMINFO_DIRS` in *config.fish* or similar config file and have them be
honored by fish.
@krader1961

This comment has been minimized.

Copy link
Contributor Author

krader1961 commented Jun 3, 2016

@layus: Please merge and test this. Works for me but I'd like confirmation from you.

return false;
}

/// Push all locale vars into the global environment where they can be found by the ncurses and

This comment has been minimized.

@zanchey

zanchey Jun 3, 2016

Member

locale?

This comment has been minimized.

@krader1961

krader1961 Jun 4, 2016

Author Contributor

Fixed

exit_without_destructors(1);
} else {
debug(1, _(L"Using fallback terminal type '%ls' instead"), DEFAULT_TERM);
}

This comment has been minimized.

@zanchey

zanchey Jun 3, 2016

Member

I think that the message warning that the value of TERM is invalid should be at level 0.

Also I don't think preferred is the right term - perhaps "specified" instead?

(I was going to complain about unnecessary string churn but none of these messages have been translated so we're good :-)

This comment has been minimized.

@krader1961

krader1961 Jun 4, 2016

Author Contributor

I was viewing this as a warning since we fell back to something useful that should work reasonably well for most people but I think you're right -- this should be at error level since the user made an error.

@layus

This comment has been minimized.

Copy link

layus commented Jun 3, 2016

It's working for me \o/.

@krader1961

This comment has been minimized.

Copy link
Contributor Author

krader1961 commented Jun 4, 2016

Merged as commit 53e865b.

@krader1961 krader1961 closed this Jun 4, 2016

@krader1961 krader1961 deleted the krader1961:curses-init branch Jun 4, 2016

@zanchey zanchey added this to the next-2.x milestone Jun 4, 2016

@krader1961 krader1961 modified the milestones: 2.3.1, next-2.x Jun 21, 2016

@floam floam added the bug label Jul 3, 2016

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