Visitar URL original
fix(man): give each shell a working MANPATH line by Rodrigo-Palma · Pull Request #4109 · tox-dev/tox · GitHub
Skip to content

fix(man): give each shell a working MANPATH line - #4109

Merged
gaborbernat merged 3 commits into
tox-dev:mainfrom
Rodrigo-Palma:fix/man-rc-file-fallback
Oct 1, 2026
Merged

gaborbernat merged 3 commits into
tox-dev:mainfrom
Rodrigo-Palma:fix/man-rc-file-fallback

Conversation

@Rodrigo-Palma

@Rodrigo-Palma Rodrigo-Palma commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

tox man tells shells other than fish, bash, zsh, csh and tcsh to edit ~/.profile. Before, sh, ksh, dash and an unset SHELL were sent to ~/.zshrc, because the old lookup was a dict keyed on booleans and the zsh entry overwrote the others with key False.

  • The shell is matched on the executable name, so /home/zshuser/bin/bash gets ~/.bashrc.
  • Outside fish, csh and tcsh the reload hint prints . <file>, since dash has no source.
  • The fish line keeps the default man path when MANPATH was unset. Before, it left only ~/.local/share/man, and man ls found nothing.
  • csh and tcsh get setenv for ~/.tcshrc or ~/.cshrc instead of an export line for ~/.profile, which neither reads nor accepts.
  • The install docs show the line for each shell family.

@gaborbernat
gaborbernat force-pushed the fix/man-rc-file-fallback branch from 5207f99 to cdc11d4 Compare October 1, 2026 22:08
@gaborbernat gaborbernat changed the title fix(man): point other shells at ~/.profile fix(man): give each shell a working MANPATH line Oct 1, 2026
Match on the SHELL executable name so a shell name in a parent directory
no longer picks the wrong rc file. Print ". <file>" for POSIX shells
because dash has no "source".

The fish line dropped the default man path when MANPATH was unset, so
"man ls" stopped working. Join with ":" like the POSIX line, which fish
splits into a path list. csh and tcsh got an export line for ~/.profile,
which neither reads; give them setenv for ~/.tcshrc or ~/.cshrc. The
install docs now show the line for each shell.

Drive the tests through "tox man" instead of importing the private
helper.

test_run_installpkg_targz installed black, flake8 and sphinx from PyPI
for two environments and hit the 30s timeout on Windows. The regression
it guards (tox-dev#3165) happens before pip runs, so stub the installer and
assert both environments install the sdist.
@gaborbernat
gaborbernat force-pushed the fix/man-rc-file-fallback branch from cdc11d4 to c116556 Compare October 1, 2026 22:10
@gaborbernat
gaborbernat enabled auto-merge (squash) October 1, 2026 22:57
@gaborbernat
gaborbernat disabled auto-merge October 1, 2026 23:11
@gaborbernat
gaborbernat merged commit 3e5db9e into tox-dev:main Oct 1, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants