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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7107 invoked from network); 8 Jul 2021 17:48:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Jul 2021 17:48:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1625766501; b=wf7vjBASlnaSUPP3/tkuF2gPe1p4RLzY54Uvv9p40m2f03ydafqgTQEgIUwW9RR5gj0dMWtK87 k6fkD9CTWFSJFjSGilfkoFvayPA70PFwno3R3DdK2NdWji4GaaN/FSBsLMfGH9v/W83PohYZVF aNtGVwXgWetA+u5P+dUxFKK3QSNUMf28DaAARP791QqW+aJj4QP967KW/jFJbfSB9eS5O7FSmz OnN/fZIW3vaAPBQ/h3klYx1SMpzSPlsHjHUPip9lKAfM5J9AzzNOPBMbQgljZmz7n57HO6QZUm R6zFdKVxzYa1A+0PBRj9kKpIpkhGVNIvOQwsm2CyYGhWqA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (quaixy.with-eyes.net) smtp.remote-ip=2.56.96.27; dmarc=none header.from=with-eyes.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1625766501; bh=8UZo1+DoowF8YLO6ZJ4mEDe5N6iIWBC0HLn/kTopWaU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:DKIM-Signature; b=xHV0t8et6VHuiqhXoLhuTUMMS/+ZpSi9mkp7PrUWdgw5hKm7pG+PLhHOHlXU+Q9REzvajWXVia K917cDDkX/19aLxlsTo440Yd/WsjwN0NPb/maOKp9VUfnho1J92Fa+dgjMm4U0lLgCBX37K4kw TX7trYaiOxnvLvZHAS2XfVdq0JMTSNmeneWC3kCVJh1nHAi5ZYJDCcINGbU6p6K1FdbPmhRThA PeT/FFGG86KmBZQo2qqNP6TSJ90jFAPFcZKxXvfy27QZ3vYzHhAcYipeR9GiDCawO9IWXNzJW7 cqZFRH5CnaJsrjcw8lW6Cp5TBHZeBUdxYw2zdPHNmgYEjw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=yQ+58h4Nba5YAFEbUJHN74WBxrQYvXzHhWCzRk2m0Bg=; b=lniNwUTWcmBSKgtohW/XdF8qdg Z6p3EX9R5EGDW/7RRuzWLHplHhc5TvrrgcEOTM2HMup+zGQtRZiMnAwEwQnzOX17I3aYsZPUQav5b AhhHFAgCkk0ScKD+om/htDLVkKcLtE5aRrIoNtul0MVcvrhhrRRygql9BHmbgS2iOqRZr1PdF2p7G IUvBO7c0h1Em4MTikz9ZBi5LJoULLihN9D8bcmsCBgkUzRtr5C65ZrdM/B3udq5AAKZ4SrJW4k1BB hkil6VuY5pPkQJESyUJPaV8NSp6a8ofX8h3fXfZY18WGHpDe0gTel175oSqRoCnDza/mNQ3gfhZXo wU+A13oA==; Received: from authenticated user by zero.zsh.org with local id 1m1Y8K-000FEh-Ka; Thu, 08 Jul 2021 17:48:20 +0000 Authentication-Results: zsh.org; iprev=pass (quaixy.with-eyes.net) smtp.remote-ip=2.56.96.27; dmarc=none header.from=with-eyes.net; arc=none Received: from quaixy.with-eyes.net ([2.56.96.27]:47758) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1m1Y7j-000EvQ-8h; Thu, 08 Jul 2021 17:47:43 +0000 Received: from choowai (unknown [158.181.69.244]) by quaixy.with-eyes.net (Postfix) with ESMTPSA id 4348C600A1 for ; Thu, 8 Jul 2021 19:47:42 +0200 (CEST) Date: Thu, 8 Jul 2021 19:47:41 +0200 From: Max Voit To: zsh-workers@zsh.org Subject: issue with completion of "module" command when using lmod Message-ID: <20210708194741.47caae8b@choowai> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seq: 49153 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: Dear zsh-workers, when using lmod for "module", Modulefiles have a ".lua" extension. With the current completion as defined in "_module", this file extension is not cut off and thus erroneously appears when one tries to load a module: module load compiler/GCC/10 results in module load compiler/GCC/10.2.0.lua instead of module load compiler/GCC/10.2.0 (and "module load compiler/GCC/10.2.0.lua" fails in Lmod has detected the following error: The following module(s) are unknown: "compiler/GCC/10.2.0.lua") The patch below fixes this issue by cutting of the lua-extension. Best regards, Max --- snip --- /usr/share/zsh/functions/Completion/Unix/_module @@ -85,7 +85,7 @@ { if [[ -n $MODULEPATH ]] && [[ ${+_available_modules} -eq 0 ]] then - _available_modules=(${$(find -L ${(e)=MODULEPATH//:/ } -type f -print 2>/dev/null | grep -v \\.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g' -e 's,^/*,,g'):#*\~}) + _available_modules=(${$(find -L ${(e)=MODULEPATH//:/ } -type f -print 2>/dev/null | grep -v \\.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g' -e 's,^/*,,g' -e 's,\.lua$,,g'):#*\~}) fi }