interactive shell detection in shrc

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
Our skel files use


case "$-" in *i*)
	# interactive mode settings go here
	;;
esac


which, IMO, is horrible for readability/usability as it suggests that
you add your changes to your shrc nested inside a case.

I'd like to switch this to the "early return" style, something like


# the rest of the file is for interactive shells only
case "$-" in *i*) ;; *) return ;; esac


Any objections?

-uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.