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 20449 invoked from network); 20 Dec 2021 20:06:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Dec 2021 20:06:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1640030764; b=qqW5OEEHyiR1ZAOSGFJAQWDuhgzGrnYtvNH4MdCvwEPfMUflgMCOYTyehgCNq/XnEXO3D/pn5y P4Vbt2a61BQFl5qFm2ZyKJLZKj2vN0JwpKzj4mPUGXgOM6AtdFOOY7CDTV6qZiqrmdsdRMxRVB AICw03KKbf4iv8rDRoQTWmehhSk9R+noLhhq+pIDNZO1zCfQ2UpObvSI/X8mIGzkAPw2kbPP80 3XYruq6R2yMnBZjcxTb3cOTPDudDSYGhE4V9Tl4o5iYeCmoKf6m4yYYT0WvCkbIViiJaP/FhMI LE6K7czyntCXpXtSmA21VM+ov7+PeHIrE+st67/ozkIbsg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f174.google.com) smtp.remote-ip=209.85.219.174; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1640030764; bh=OiJvJK5r4ImzfgDkvosLYIxBvPDN+/a6rwuWQLGlrPQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=DdzDgtDNU1OtSydoAfJvQ0LWUsEAuTRYmvWr14gevyWKwGffTlDw/QNtS3B+mkpTBKY3CtwOPq NW/us6kkqVAd5+7FosuPb4gtfM+0P8iqdxtwROOlNN+ret6tp8Pu9HCX9soLW1zt4tWMgNSkUz fNIXhUXrGNXDDO8m+LMuh0UIMFSo2989NaviFskkAKGOslts7+671gN4Kc+iwDUEBd5SB3a21n +JpiZ+ZthJHs7PzlE3AeTKTqVxzz9URahxjbJNbVLGR59tDelx1zXsgKZ/H22KlWghlMufnsYS 3KEYJm8VUdMNUB9lp7kcftVJFRxjre50ATFQvWsSV4NBJw==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hCizqO9TUyaMQzieyFpQKC3LIU2GxIwXGUZsqTxq+Z8=; b=U/D/uHoJuS3rNA+5B5Tp4OP/bX SVkovjcoOvqJsCn+x0hXwcbHMHvuSskAFlov43nCP70UOJ/UwifFy01W8eEiwz2w6EIXGNTlnN0n0 jslCVCgyj5a0rYezvSt5BPRwP31zHomW29ybPxGibQIQgJw/xNDEPwyfFTZWPI8LHvxiwHn5Jmvc8 cgr9YXZlsb7iG/eW/abnRqr0NLtil+cO+3eouCq4h2FIxhZr1AFooymzhQsRuSyY1uxWh9fGwVgjY VTHnZgwiqO4PFgbYmquZTwI4GdWTUYgwJ8a+/N4jEtNR83MZwVyJ1bzAP/XhKBO6+IXtGVo+MA9Ab o4LXj8Ng==; Received: from authenticated user by zero.zsh.org with local id 1mzOv6-00091a-Dj; Mon, 20 Dec 2021 20:06:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f174.google.com) smtp.remote-ip=209.85.219.174; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f174.google.com ([209.85.219.174]:38509) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mzOu8-0008Jh-PI; Mon, 20 Dec 2021 20:05:05 +0000 Received: by mail-yb1-f174.google.com with SMTP id v64so32121277ybi.5 for ; Mon, 20 Dec 2021 12:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hCizqO9TUyaMQzieyFpQKC3LIU2GxIwXGUZsqTxq+Z8=; b=c2JZU/SZMBmz6kevyjTOZkahXoF+nngN0cH/y1KT0v/V4TRi91HtUNjwsi3JcosUrL gEUrEf9nlfdG9rJjp8bgf1DJZcLEaS/i7ofbld/uX8o5BzoaCDrAGbdWP1HD6pEAOEYL dOi3uFoKTguMl2oTwxb6WxgIdWk7LU8SCRAWdqq7CLSZAQ+mYjfmYfN3jEqiUxCWh7xw MMIa/QJCSk+6YLj9S5dbiuBxhZAVDd0W+/R34I+A7Lftob4LugfUs+6a7lQ4dwTWjZPv DJHsrKYX2UspLEVK+X3gBwrvyNXwov53FwQi7JtEmu9BqbLrimKSPSdTOHjV3nTExkbJ z3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hCizqO9TUyaMQzieyFpQKC3LIU2GxIwXGUZsqTxq+Z8=; b=kHthyAv/h+ZgjtHSAJ7am4mZ7nCYHqYDrHQKX/angZ4/QwtPAFSXCXFPkoU1z7ajRn vpp8cmmO+JLbPY4BFGEmZ8HrAKk8Loc2vZYuGLogfPoiPYXhYsMaqSPOr2PsuiM+Sg7N ASbL2mZNKA2DvmHA0Ac6lpm9jHMkN8bjkWZ/HSTRctB16NqDgQcaWaVem1V+91ZIYDbb MOHQwxzSjFYhd5ExYa+uCvJtfGkVlODt5X/RLelgdplRhdU11bb8CMv8KjKRttvNG1f5 xwhlC3IsK2Tp0toKnCV5rMjR5tuUn0GRHo6D8epGZgi5j7z7fYFCfRon+KDub6fR6mD8 p1yA== X-Gm-Message-State: AOAM530dubjr2NrcVVHnY5mQOYUkzIseACwuIAQcY6ulQCvd9I8/k3qT xtPcGESESo7nOzrMwAQuhYBI/s4z4MYRi+WZodn20Q== X-Google-Smtp-Source: ABdhPJxNSqZmplHH+I2GhGVjABUeLTeZ3lj3BdspeGvl9g9MHYKcYZ8S7QMbJbD8CPfjBU2yTa6aguOB1DgAQVaLfa4= X-Received: by 2002:a05:6902:102e:: with SMTP id x14mr24355346ybt.716.1640030702596; Mon, 20 Dec 2021 12:05:02 -0800 (PST) MIME-Version: 1.0 References: <64ee9965-6517-481f-9fb5-683bd48cf220@www.fastmail.com> In-Reply-To: <64ee9965-6517-481f-9fb5-683bd48cf220@www.fastmail.com> From: Bart Schaefer Date: Mon, 20 Dec 2021 12:04:51 -0800 Message-ID: Subject: Re: Global Aliases, but as a function? To: Daniel Shahaf Cc: Zsh Users , Zach Riggle Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 27428 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Dec 20, 2021 at 10:42 AM Daniel Shahaf wro= te: > > One could have preexec() install wrapper functions that shadow the > command words of any simple command that has a =C2=AB--help=C2=BB argumen= t. Yes, this is another possible approach. Such a function would then have to uninstall itself again ... that gets a bit messy if there might be other wrappers. The conditions for whether to install the wrapper would be similar to those implied for the zle-line-finish hook. Personally I'm curious what the necessary command-agnostic help-coloring pager might be.