Date: Wed, 21 Apr 2010 22:11:32 +0200 From: Polytropon <freebsd@edvax.de> To: Erik Norgaard <norgaard@locolomo.org> Cc: questions@freebsd.org Subject: Re: multishell user profile Message-ID: <20100421221132.7a42a41d.freebsd@edvax.de> In-Reply-To: <4BCEAEDC.8000700@locolomo.org> References: <4BCEAEDC.8000700@locolomo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Apr 2010 09:53:00 +0200, Erik Norgaard <norgaard@locolomo.org> 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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100421221132.7a42a41d.freebsd>