From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56056 invoked by alias); 23 Jun 2015 14:54:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 55957 invoked by uid 89); 23 Jun 2015 14:54:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f54.google.com Received: from mail-oi0-f54.google.com (HELO mail-oi0-f54.google.com) (209.85.218.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 23 Jun 2015 14:54:25 +0000 Received: by oigb199 with SMTP id b199so8716539oig.3 for ; Tue, 23 Jun 2015 07:54:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=O5RLIZk4keCpGB9M+Jmr1jvLxvH+0Ai2xpjTbUBsd7g=; b=layIJUmn7rM31fN4cIEfL6B6nM1hsV76CiI1uDpxht1aNQt94wxXppJocG77Lck9By 1l23X5TeDuBLTu6D0HMpFRyRkDbqKBHzuIvN9Uinc5tqJ2l9yy5PSFn01In3mZk9EaP8 pfHBi7iZud83sRQX+4hw3ZrI3Ha+IwOQnfLtZ8DW8WuHjhs/oc8Q/93nngIGacA47Qsr 6f5whklvHSyNs32Nw0qcWeoCiwyLsJgCUa8tHYwJCRQzqZXnPY/bExePPFxSbABWnp8U zRl+qJG88XFpCCuLw2nQ5bKh27gULHiHVOiNiSUavIDyl1EECePka9silDN1Ph2BCb1h 8wJA== X-Gm-Message-State: ALoCoQmRwdMn3dTNXeaWKcP6fhSRYJTUkw8tCqIAdlJ+X78QxooEA7x7Xeu23Sr8v1BtShqP1Pxj MIME-Version: 1.0 X-Received: by 10.202.88.66 with SMTP id m63mr28521108oib.47.1435071263682; Tue, 23 Jun 2015 07:54:23 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Tue, 23 Jun 2015 07:54:23 -0700 (PDT) In-Reply-To: References: <1434943800-9274-1-git-send-email-patrick@parcs.ath.cx> Date: Tue, 23 Jun 2015 14:54:00 -0000 Message-ID: Subject: Re: [PATCH] Add tab completion for TUI's "focus" command From: Doug Evans To: Patrick Palka Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00468.txt.bz2 On Tue, Jun 23, 2015 at 9:37 AM, Patrick Palka wrote: > On Tue, Jun 23, 2015 at 10:01 AM, Doug Evans wrote: >> On Sun, Jun 21, 2015 at 10:30 PM, Patrick Palka wrote: >>> The implementation is pretty straightforward, though there's the >>> question of what the completion list should show when the TUI has not >>> yet been initalized. >> >> Hi. >> What does "not yet been initialized" mean here? > > I mean that the user never switched to the TUI during the session, so > the windows and stuff have not yet been created. Thanks. I tried "focus cmd" and "focus src" at the start of a gdb session and they worked. I also tried "focus asm" and got a complaint of an invalid window. So I'd say sure, add cmd and src to the completion list even if TUI isn't initialized, since the command will work as expected. I'd add a comment to the code describing why they're being unconditionally added. Adding next and prev when TUI hasn't been initialized are kinda the odd ones out, conceptually, but they too "work" (so I'm not suggesting removing them).