From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16034 invoked from network); 18 Jul 2005 10:13:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jul 2005 10:13:43 -0000 Received: (qmail 33780 invoked from network); 18 Jul 2005 10:13:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jul 2005 10:13:37 -0000 Received: (qmail 16176 invoked by alias); 18 Jul 2005 10:13:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21488 Received: (qmail 16156 invoked from network); 18 Jul 2005 10:13:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Jul 2005 10:13:34 -0000 Received: (qmail 33458 invoked from network); 18 Jul 2005 10:13:34 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 18 Jul 2005 10:13:27 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 18 Jul 2005 11:11:24 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 18 Jul 2005 11:15:22 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j6IADPOC021742 for ; Mon, 18 Jul 2005 11:13:25 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j6IADPij021739 for ; Mon, 18 Jul 2005 11:13:25 +0100 Message-Id: <200507181013.j6IADPij021739@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Implementation of simple newuser module (how to start?) In-reply-to: References: Date: Mon, 18 Jul 2005 11:13:25 +0100 From: Peter Stephenson X-OriginalArrivalTime: 18 Jul 2005 10:15:22.0987 (UTC) FILETIME=[9BBDB3B0:01C58B81] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=ham version=3.0.4 Keir Mierle wrote: > It appears there is some consesus on how we can start making zsh more > usable. The idea of a 'newuser' module is great; there's tons of > things we could put in to make it easy for new user while not > frustrating zsh veterans. We have to finalise what paths to search and what files to look for. Bart suggested checking for autoloadable functions. It's a bit fraught checking for this in the normal fpath or even in site-functions, however, unless we use a name that we can be reasonably sure won't already exist. I still quite like the idea of simply sourcing, say, the first of /$VERSION/newuser or /newuser that appears. This can always define or autoload a function and then run it. The file also stands out---it's easy to see if you're system's set up to support the feature, and remove it if you don't want it, and it's easy to see if there's a file overriding the version-specific one. The default version could then contain "autoload -U zsh-new-user-setup; zsh-new-user-setup", for example, and the function could be in, say Functions/Newuser and installed as part of the newuser module. (We would have to add something to the .mdd file to install the newuser file itself.) Another question is if zsh/newuser should be loaded before or after /etc/zshenv (it can't be any later than just after that). Presumably the code for zsh/newuser will be fairly small, so there's some reason for it being linked in by default when it's in use (this doesn't stop it being formally "unloaded" even though it's still present in virtual memory). That's easy to configure, however, and we can mention it in the release notes, so I don't think we need to alter it in the distribution. > I know absolutely nothing about the zsh codebase, so I've started > poking around. Now, in the interest in maximizing the amount of work I > get done while minimizing the amount of time I spend (because I don't > have much time to spend on open source stuff), could the list give me > a brief synopsis of what files I should be looking at, and what files > I should create? There's an argument that only .zshrc needs creating. It varies from person to person how much people want transferring in .zshenv. I set options like extended_glob there so the environment is sane when I run, say, grep from inside Emacs. However, some people like a fairly clean .zshenv. It's usually OK to set variables there. Probably just .zshrc would do for now. > To start, I was thinking of just creating a zsh script to walk the > user through setting up their prompt, turning on completion, and > telling them about autocd and a couple other options. That's probably a good idea, although it needs an easy way to abort and ensure it's never run again ("touch ${ZDOTDIR:-$HOME}/.zshrc" will do) and perhaps also to defer running it until the next time (simply aborting will do). Also, there are some advantages in having a function rather than a script, as suggested it above (it can "unfunction" itself at the end to remove it from memory). Have you looked at Completion/compinstall? It serves as a model for one way of doing this. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************