Summary: | /etc/skel/.bashrc inaccuracy | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthew Walster <matthew> |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Matthew Walster
2004-12-30 19:55:30 UTC
The comment is not perfect, but pretty close. If you generate output from .bashrc, you should do it after a test for interactivity (by checking for PS1 or "i" in $- as explained in the bash man-page) Currently in portage, the comment is: # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. This isn't perfect since some versions of scp can tolerate output, but it's close enough, IMHO. I believe there are older versions of scp that will break if .bashrc generates output without a prior test for interactivity. i have broken my scp's in the past because my .bash files would run `screen -list` without checking to see if $TERM was "dumb" or not scp would fail w/out error and/or any output, was quite annoying to track that bug down :) |