From owner-freebsd-questions@FreeBSD.ORG Sat Jan 1 10:01:35 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C551106564A for ; Sat, 1 Jan 2011 10:01:35 +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 1DE3C8FC0C for ; Sat, 1 Jan 2011 10:01:34 +0000 (UTC) Received: from r55.edvax.de (port-92-195-37-207.dynamic.qsc.de [92.195.37.207]) by mx01.qsc.de (Postfix) with ESMTP id 4D6FF3D739; Sat, 1 Jan 2011 11:01:33 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p01A1Vww002558; Sat, 1 Jan 2011 11:01:32 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 1 Jan 2011 11:01:31 +0100 From: Polytropon To: Gary Kline Message-Id: <20110101110131.26d20d64.freebsd@edvax.de> In-Reply-To: <20101231211542.GA8373@thought.org> References: <20101231211542.GA8373@thought.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: FreeBSD Mailing List Subject: Re: cshrc to bashrc?? 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: Sat, 01 Jan 2011 10:01:35 -0000 On Fri, 31 Dec 2010 13:15:45 -0800, Gary Kline wrote: > Anybody know if there is a utility that transforms the /root/.cshrc > into a bash RC file?After decades, I'm giving up on the csh stuff. > Need something simpler. As far as I know, there is no automatic converter for csh -> sh config files. Basically, the C shell has these: - system-wide: /etc/csh.cshrc, /etc/csh.login, /etc/csh.lougout - per user: ~/.cshrc, ~/.login, ~/.logout I'm a csh user for most dialog use, because bash's interactive abilites force too much interaction (especially regarding completition) in the default configuration. But I'm more and more thinking to switch to bash permanently, as soon as I've beaten bash's misbehaviour out of its source code. :-) The system's sh uses /etc/profile and .profile in the same manner. Then there is bash, which I think uses the following files according to "man bash", section FILES: /etc/profile The systemwide initialization file, executed for login shells ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-interactive-shell startup file ~/.bash_logout The individual login shell cleanup file, executed when a login shell exits ~/.inputrc Individual readline initialization file You have to know about the different syntax definition for both file types, but it's relatively easy. setenv ENVNAME envstring -> ENVNAME="envstring"; export ENVNAME -> export ENVNAME="envstring" set VARNAME = 'varstring' -> VARNAME="varstring" alias aliname 'alistring' -> alias aliname="alistring" All the config files allow regular sh coding sequences (such as the use of conditionals or iterators). To get a standard prompt in bash, use this: export PS1="\u@\h:\w\$ " It is the equivalent to csh's set promptchars = "%#" set prompt = "%n@%m:%~%# " Note that csh does automatically use % or # according to the first setting. I'm not sure how bash handles this. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...