From owner-freebsd-questions@FreeBSD.ORG Thu Apr 22 00:33:29 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61A32106564A for ; Thu, 22 Apr 2010 00:33:29 +0000 (UTC) (envelope-from vogelke@hcst.com) Received: from beta.hcst.com (beta.hcst.com [192.52.183.241]) by mx1.freebsd.org (Postfix) with ESMTP id 2CEAF8FC17 for ; Thu, 22 Apr 2010 00:33:28 +0000 (UTC) Received: from beta.hcst.com (localhost [127.0.0.1]) by beta.hcst.com (8.13.8/8.13.8/Debian-3) with ESMTP id o3M0XSuR007950 for ; Wed, 21 Apr 2010 20:33:28 -0400 Received: (from vogelke@localhost) by beta.hcst.com (8.13.8/8.13.8/Submit) id o3M0XSfL007949; Wed, 21 Apr 2010 20:33:28 -0400 Received: by bsd118.wpafb.af.mil (Postfix, from userid 583) id B61A7BDF4; Wed, 21 Apr 2010 20:30:59 -0400 (EDT) To: questions@freebsd.org In-reply-to: <4BCEAEDC.8000700@locolomo.org> (message from Erik Norgaard on Wed, 21 Apr 2010 09:53:00 +0200) Organization: Array Infotech X-Disclaimer: I don't speak for the USAF or Array Infotech. X-GPG-ID: 1024D/711752A0 2006-06-27 Karl Vogel X-GPG-Fingerprint: 56EB 6DBF 4224 C953 F417 CC99 4C7C 7D46 7117 52A0 References: <4BCEAEDC.8000700@locolomo.org> Message-Id: <20100422003059.B61A7BDF4@bsd118.wpafb.af.mil> Date: Wed, 21 Apr 2010 20:30:59 -0400 (EDT) From: vogelke+unix@pobox.com (Karl Vogel) Cc: Subject: Re: multishell user profile X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2010 00:33:29 -0000 >> On Wed, 21 Apr 2010 09:53:00 +0200, >> Erik Norgaard said: E> I need to create a user profile that works in different shells, E> particularly bash, csh and ksh. It seems that these does not read the E> same files and/or in the same order. So, how do I configure the shell E> profiles without configuring each shell separately? The two things that bite me the most often when switching shells are environment variables and aliases. I keep most of my environment stuff in a single file ($HOME/.envrc) with entries like this: # Local time for RCS date information RCSINIT "-zLT" # Default file browser. PAGER "less" A small perl script converts this into sh- or csh-style commands, so I can just source the appropriate file from .bashrc or .tcshrc or whatever: me% cat ~/.envrc.sh # Local time for RCS date information RCSINIT="-zLT"; export RCSINIT # Default file browser. PAGER="less"; export PAGER me% cat ~/.envrc.csh # Local time for RCS date information setenv RCSINIT "-zLT" # Default file browser. setenv PAGER "less" Aliases are annoying because the syntax is inconsistent, so I only use those for inside-the-shell stuff like job control. Small ~/bin scripts handle things like using "dir" instead of "ls -lF": #!/bin/sh #