From nobody Fri Jan 10 08:01:28 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YTvHY0XPpz5jn8H; Fri, 10 Jan 2025 08:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YTvHX6WFcz3wr6; Fri, 10 Jan 2025 08:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736496088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yM8NLvU1orLcBJq2LSDTUsjdb9E0WPy7rHH6Uw9nVbg=; b=VQe3AQUCSXyHMpmfRPrYlg/UxCNI6U2hKVju0kP/ImVYT2ECHhE5L6SglW452laX7H5cAt Ljw1yQTtjWSDtZy/v4xn/bkkmKbR1rug7jvCkC4eF+lCwU60vk9pgavP+x2Ro8U5F5a1Vw VasxRW07gaZqQxx+xemjfXLA2vsq+qbP7cKteq7ulvbz93zK/ny+8bHgUv1VqGEPR+TV09 qHpMJD14HvKaXoCOYuOLda5MuGKFR4z+4iAtIn9U6+RWB5RcekcrGs5p8iWcEBi/h21Lid GdBAsxXpKjdLNDYBiGQ4TMAzWGDxbSIQDP7BZ5p7pe5iL+uIQqnODXA1VBs5ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736496088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yM8NLvU1orLcBJq2LSDTUsjdb9E0WPy7rHH6Uw9nVbg=; b=INPuh9wEutRiB93SSkPP/estU0+lNz/3VdLG1BLQx/XaqXkVIy/C8Lh8THv9vFRXZUONfn pcqSwoEi9TGTboCPNPzTtK48fxkkGOhKyhLyDfkr5CU/qakvSuyv5OWjqkNyyIG5B7C890 phmx/mdaYYQ1dsCjU6oJYbZM82nXDBYnQASHoKFAtbWegsKXFT+6cCJrLSqWjiPjYThX1s 5zNyExjw9ddnaJYDQ9vXX5v0AzFV0G/8HvpeBVK3Q4MxKs8Apsz3Inkl+/03gr2lLXps+h kk2QMHpVnpHMlNFw0H2j5fMjygluKQjyOrRtwGN+YmctiyGIzGzsbrLFx/GULQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736496088; a=rsa-sha256; cv=none; b=oKgc7nh9+wyDJo+YVY5piV/TBcY7k7ysxWp7hO8NnsrHkRx9Yjup1/GOEAFdSUxcIrEMws VKWfLH8r93zSAst3q9UhsaQVA6ZHLSxzk86tTfVcd/cgCoZFA4xJlpm1cR5nErbcMuSRoT JPJgtTWz90Yp5nrOAGrGica03ZOjuSul8iz6E5ZAbd5C4UY4RKeb7vG7oatXdFmxi8jCVC AA0IqSAxm7AhlIoTsVkvXp157MyOznfRZ+ALr1mR3VgZBBWU7qah5MBQSo8HXNbzGBdMaU digFQwMsgmdbu1Ja/uKyF/RVYjfV5qlpjLez+v3N2j8ow/ABCfbTK/5gWU/dfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YTvHX63kPz13HF; Fri, 10 Jan 2025 08:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50A81SUQ065678; Fri, 10 Jan 2025 08:01:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50A81SXf065675; Fri, 10 Jan 2025 08:01:28 GMT (envelope-from git) Date: Fri, 10 Jan 2025 08:01:28 GMT Message-Id: <202501100801.50A81SXf065675@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: ef64775074c3 - main - shells/zsh: add completion for mdo(1) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef64775074c37030deb876254221e5c1286d4e3d Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=ef64775074c37030deb876254221e5c1286d4e3d commit ef64775074c37030deb876254221e5c1286d4e3d Author: Baptiste Daroussin AuthorDate: 2025-01-10 08:01:05 +0000 Commit: Baptiste Daroussin CommitDate: 2025-01-10 08:01:26 +0000 shells/zsh: add completion for mdo(1) --- shells/zsh/Makefile | 4 +++- shells/zsh/files/_mdo | 18 ++++++++++++++++++ shells/zsh/pkg-plist | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile index c4dabc1fced6..d3e7f5711c9f 100644 --- a/shells/zsh/Makefile +++ b/shells/zsh/Makefile @@ -1,6 +1,6 @@ PORTNAME= zsh DISTVERSION= 5.9 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= shells MASTER_SITES= https://www.zsh.org/pub/ \ SF \ @@ -107,6 +107,8 @@ post-build: ${WRKSRC}/Doc/zshall.1) post-install: + ${INSTALL_DATA} ${FILESDIR}/_mdo \ + ${STAGEDIR}/${DATADIR}/${ZSH_VER}/functions/Completion/Unix/ ${MKDIR} ${STAGEDIR}${DATADIR}/site-functions ${LN} -f ${STAGEDIR}${PREFIX}/bin/zsh ${STAGEDIR}${PREFIX}/bin/rzsh # Precompile completions and functions diff --git a/shells/zsh/files/_mdo b/shells/zsh/files/_mdo new file mode 100644 index 000000000000..32d1c83aab3a --- /dev/null +++ b/shells/zsh/files/_mdo @@ -0,0 +1,18 @@ +#compdef mdo + +local environ e cmd cpp +local -a _comp_priv_prefix +local -A opt_args + +zstyle -a ":completion:${curcontext}:" environ environ + +for e in "${environ[@]}" +do local -x "$e" +done + +cmd="$words[1]" +cpp='_comp_priv_prefix=( $cmd -n ${(kv)opt_args[(I)-u]} )' +_arguments -s -S -A '-*' : \ + '-u+[run command as specified user]: :_users' \ + '-i[keep the calling user]' \ + "*:: :{ $cpp; _normal }" diff --git a/shells/zsh/pkg-plist b/shells/zsh/pkg-plist index 63145be027e1..145b93d13925 100644 --- a/shells/zsh/pkg-plist +++ b/shells/zsh/pkg-plist @@ -627,6 +627,7 @@ bin/zsh-%%ZSH_VER%% %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_make %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_man %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_md5sum +%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mdo %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mencal %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mh %%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mime_types