From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 03A3C3858D20 for ; Fri, 29 Mar 2024 12:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03A3C3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 03A3C3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711714466; cv=none; b=VSasX6mSaudSYZSzmWsuVbg8SmmgVNhybssj0km5dTo/2u/tNT67Oqlt90oM1cR3eDUi/aUr3A0gAIRbWL3UA4TuJ3+dYjKorOG8ugVtpqww/Y1pIelkwYIEDgYESicTzmOS7ZXtIDmfAz4CahQ/ThCScxKKPTN2xMLxZPaW8Qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711714466; c=relaxed/simple; bh=xLZdGIsSMgqRvJMisEgGGOxVKwrcVs9eoYu9yCqBOYM=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=KA8CGfB2f+vf2N6Ko9ZZi+n6M9lfwF12Tp4rzUe/imeOAOumt8b4+URtFH8iUSPN5VsbACWlE+kM2JIfjV/0ACXhTKDv5qvnOVDiHj8qw0kWgwNY0fRSzVQRpWs5P2AdJuVpxbN4j6dhng0Kw2VD1PD679rXIz4rVyEA1H5QBrE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqB7n-0003Av-Mi; Fri, 29 Mar 2024 08:14:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Au8r6ZpqoxxdDwxLaD3gSwDNCwtnucVElSngbU7n9V8=; b=G7dk9qPDWL1R 8jbY1io7qCGDqfxUYgDkgtNKvSGi4R/h6UvEPjEVttTtRUuHRr+M4MfLPKlatenKYCVWapEeXoq2K i9dfsjcYJWIuwObszi2QMnfsjSkqz7Cd+mYZ0gQ0VcX9UtfJPQMoTngNxU+S19KjEHNaxQVBGRXr0 CCTGKdWR3538UmYgbq4JoyS51umSCpZze1AsVLh1xPmcFh22Lo5Xli+1ATwV3zVw+7YEq34mJubox +r+LixeyCVIeiqKoVpA8z58K0dBis4K71DnnsYhm/DKXsyG7PyvryvY2hUQEX2RbqachyWXNuHBVq jmB0YIo/R7q/auCKKG8eXw==; Date: Fri, 29 Mar 2024 15:14:07 +0300 Message-Id: <86v855dyls.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: (message from Andrew Burgess on Fri, 29 Mar 2024 11:42:28 +0000) Subject: Re: [PATCH 2/6] gdb: move display of completion results into completion_result class References: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Andrew Burgess > Cc: Andrew Burgess > Date: Fri, 29 Mar 2024 11:42:28 +0000 > > When using the 'complete' command to complete file names we have some > problems. The suggested completion should include any required > escaping, so if there is a filename '/tmp/aa"bb' (without the single > quotes), then this should be displayed in the completion output like: > > (gdb) complete file /tmp/aa > file /tmp/aa\"bb Why should it be displayed with the backslash? And would the completed name, if passed to a command, also have the backslash added? If so, it could cause some commands to fail; basically, you are adding shell file-name semantics into commands that don't work via the shell. So I'm not sure I understand what is being intended here, and I'm afraid you will uncover a lot of problems as you go with this (as you already discovered). Apologies if I'm missing something important here.