From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2715 invoked from network); 31 Oct 2023 00:54:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Oct 2023 00:54:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1698713665; b=M5cin8Ko+Bqct25BVsWJw/VJl30PwTGWaJFYvAn4CB5u/Ar8Pzm+BemJwVXYWgpSTFFhlTD1ag QXL5GuhCYGIFT4JeAXvbtXOQsT5yfxjFzy5bbVJ+P+CjFLXz+OJqtcjT9dGn4dhVV9pb/OYf1Z Ae+PfpFJ7h0k603wam9/6Z7cSWTng6N1p8qxbe5CIfl79Dz4O95B4aJTI51eO0N22MfdNKjI4B 5aiirIc5I6ZbrgymY4TwAwll4/WcEZQT6+puHUqiVi/hjTlxfsQ/P9xbZ/kRBF6UNCwlJ9iogY ag8SotuXdrQiAovrwDB8937APzqLNR0lIuzOUxqgTisqkw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (divok.kovidgoyal.net) smtp.remote-ip=166.78.104.224; dmarc=none header.from=kovidgoyal.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1698713665; bh=kWniXI1TfeB09TAe7FQa0TvVh+rcwYzNP3fITA8HcgM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature; b=k2yqOUrX/GO4gvcUJO2+7jVMbbXKTKfErca/IhgEYp0vsh6umzlsAX4bXGk6l1Od13MVX8lP5p X4+VieIU7qoFtrEVPlD8jIi+zFC/4S2rjbfIqhKKZ94DDwN9JEbJYM4DE441PSNA+8SLHgiBx8 tCnzP3/YlGibw4ndD0QhTcdmRi9A5VzlEmTiOPX5n+WKwXuL07AY9vYyv/NtQBVld3UPWOh66Q iIxfb1j23dfuS9ai+gxWoHLgExWJGqun8rXjGDIFITHw7zQQUDwN3qx7qnvtZFOgeWNPyzm6qH ZtdUyK4DsFpSggpvrypjyA7t4Pp/Jgx8TTyxsRIcf9fKow==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=WaLKKEsE/hRq/3ziO3AsoQl7+rSKYvzWxK12wzWJYYE=; b=IkUw1jaGTvhGgW1dlZEp0rNcng uvqL4VVMo1hbKlkR4NZVZekK5UdiD0hQUYh3HY7KXnulTqdOYbx182mQtSnItOEsLMQwgieYV1GF1 GnyZG0YHH3pxj+qbLlYIBt9ulNyrVcjD2IS9iFiE8HT/7Ak2tJSOJYs3377QVRb4q7//kbl6cZej5 89Of3d64fGAt1gy6HJ64MT+sDl+24uEUby+I71G+gFoXxJzaKWqvblYeTrNKT5aFYRg36pTHLs8+B 8w0E5iBE2wldoCa9BttxmgdDQ0R7pNj6nXHDA1MGcrtRGdb3vBrsVNC+auLwtpfgmgLCs4bONfTKr dQ4UGDtg==; Received: by zero.zsh.org with local id 1qxd1U-0006YS-4R; Tue, 31 Oct 2023 00:54:24 +0000 Authentication-Results: zsh.org; iprev=pass (divok.kovidgoyal.net) smtp.remote-ip=166.78.104.224; dmarc=none header.from=kovidgoyal.net; arc=none Received: from divok.kovidgoyal.net ([166.78.104.224]:59850) by zero.zsh.org with esmtp id 1qxd0v-0006FG-BU; Tue, 31 Oct 2023 00:53:52 +0000 Received: from [192.168.1.5] (unknown [114.143.34.5]) by divok.kovidgoyal.net (Postfix) with ESMTPSA id F1DFBC021E for ; Tue, 31 Oct 2023 06:23:47 +0530 (IST) Date: Tue, 31 Oct 2023 06:23:41 +0530 From: Kovid Goyal To: zsh-workers@zsh.org Subject: Bug in sudo completions Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Seq: 52254 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Completions for sudo fail when specifying environment variables on the command line. For example: sudo a=1 ls - gives No matches for: `file' while sudo ls - gives zsh: do you wish to see all 171 possibilities (58 lines)? This is likely because the completions script thinks any argument not starting with - means the program to complete, which is not true. Quoting from man sudo sudo [-ABbEHnPS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i | -s] [command [arg ...]] Note that VAR=value can occur before -i or -s and before command. -- _____________________________________ Dr. Kovid Goyal https://www.kovidgoyal.net https://calibre-ebook.com _____________________________________