From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 463 invoked by alias); 26 Oct 2014 19:55:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33543 Received: (qmail 21605 invoked from network); 26 Oct 2014 19:55:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=HYUtEE08 c=1 sm=1 tr=0 a=Jo8+aa5pSBmSq6qAtEZJxQ==:117 a=Jo8+aa5pSBmSq6qAtEZJxQ==:17 a=sicYhokT53YA:10 a=N659UExz7-8A:10 a=66rsHvc3yaHuL0BGDLkA:9 a=pILNOxqGKmIA:10 Message-id: <544D5242.7000505@eastlink.ca> Date: Sun, 26 Oct 2014 12:57:54 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-version: 1.0 To: zsh-workers@zsh.org Subject: Re: first adventures References: <544D2D6F.8030505@eastlink.ca> <141026105032.ZM13782@torch.brasslantern.com> In-reply-to: <141026105032.ZM13782@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 10/26/2014 10:50 AM, Bart Schaefer wrote: > On Oct 26, 10:20am, Ray Andrews wrote: > } > } I'm trying to figure out where/how command lines are grabbed (I think > } this is done by zle?). > > Well, it's done by ZLE when ZLE is active, which it isn't always. > > However, I think what you're looking for is Src/Zle/zle_main.c in the Nuts! I never even thought to look in a subdir. No wonder all trails went cold. > function zle_main_entry() under "case ZLE_CMD_READ" where the call to > zleread() is made. Or perhaps where that's called, which is usually > from Src/input.c:inputline() via zleentry(ZLE_CMD_READ, ...). > > } ... I'm hoping there will be some_string somewhere such that: > } > } puts(some_string) > } > } ... will print exactly: > } > } some-command $1 *.* !{1, 1 & @ >>! $2 "no parsing please!" .. () > } '<<' `# ^ -n(*&<)` {} > > No, that there isn't, though if you look around line 296 of input.c where > the VERBOSE option is handled, you'll get close. The input line is read > into what's called "metafied" form by zleread() and has to be unmetafied > [by the aptly named function unmetafy(), Src/utils.c] to return it to > the raw input form. But. But ... we can't get the string before it's metafied in the first place? How is it possible for it to be metafied before 'it' exists? If I can have a meta-fried egg, surely at some point there was a raw egg? I was looking in hist.c, because the one place where things seem to be stored 'literally' is in .histfile. The Tao of zsh is a deep thing. But somehow I just can't get anything to print if interactive. I've got lots of feedback if adding " puts("Hi. This is line xxx of file xxx") " ... sort of things in the code when running a script, but if interactive nothing ever shows: // if (isset(VERBOSE)) { /* Output the whole line read so far. */ zputs(ingetcline, stderr); fflush(stderr); // } ... nothing doing, no output. I tried it from console too. Nothing. Is the xterm somehow interfering?