From owner-freebsd-questions@FreeBSD.ORG Wed Apr 21 20:11:36 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 3718D1065675 for ; Wed, 21 Apr 2010 20:11:36 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id EBEC88FC22 for ; Wed, 21 Apr 2010 20:11:35 +0000 (UTC) Received: from r55.edvax.de (port-92-195-212-106.dynamic.qsc.de [92.195.212.106]) by mx01.qsc.de (Postfix) with ESMTP id DC6C73CCB8; Wed, 21 Apr 2010 22:11:33 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o3LKBXrD001511; Wed, 21 Apr 2010 22:11:33 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 21 Apr 2010 22:11:32 +0200 From: Polytropon To: Erik Norgaard Message-Id: <20100421221132.7a42a41d.freebsd@edvax.de> In-Reply-To: <4BCEAEDC.8000700@locolomo.org> References: <4BCEAEDC.8000700@locolomo.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: multishell user profile X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 20:11:36 -0000 On Wed, 21 Apr 2010 09:53:00 +0200, Erik Norgaard wrote: > Hi: > > I need to create a user profile that works in different shells, > particularly bash, csh and ksh. It seems that these does not read the > same files and/or in the same order. So, how do I configure the shell > profiles without configuring each shell separately? You can't - at least not very easily. Of course, you can do as few shell initialisations per se if you use things like login.conf to set environment variables instead of "manually" setting them in the shell config. The main problem is: The shells you mentioned to use different formats for their configuration. For example, while you can use set promptchars = "%#" set prompt = "%n@%m:%~%# " for your csh, you have to use a different syntax in bash. The same goes for aliases. A chance to partially bypass this is to put as many customization as possible into script-defined commands that you place in ~/bin (and add this to $PATH). Of course, this approach doesn't solve all imaginable problems. As for reading order of configuration files, refer to the manpages: man csh man bash man ksh You will see which files are accessed, and in which order, and where you can put centrally managed profiles as well as user- specific profiles. > Also, I can't find information if they use the same syntax, or what > syntax they share so I can stick to that. They don't use the same syntax. Maybe you'll find a good comparison chart of shell syntax and capabilities. As stupid as it may sound, you'll find some information here: http://en.wikipedia.org/wiki/Comparison_of_command_shells http://en.wikipedia.org/wiki/Unix_shell -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...