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 25126 invoked from network); 2 Feb 2023 18:29:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Feb 2023 18:29:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675362559; b=PgjYIFC//WJSMOxUnDwu79rY+QWUCE1JdRKTo56vdbJaZmUUzS/p4Lt0MM6sBv/O30/xMTXEwB NaYAdpX6Hof6tzyRBmR+Vg1Iyn9HmMyqMNHT2a61KOTPeDfyg3yoLffw66PRu+Mn2xCOIbGKcG 5BExiJaJWqtF9wqFS09IvJfk4WeT5PTJgB5ff3V7zGWnnWtDQOVofkblT2ppRcwKNq83Gmy1Qu S9MOatJwvNHS+Wd6ceP+Dcu2hxVNja8przYVjwM4ztXpBU+dZZemS3jrsMKNJZWkUWLYcIcdzl GYPRrQf0MzXO6b0DLtEQG8ukbDQQ6fFtxAmepKnxEtHNmQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; 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=1675362559; bh=xE/MQdP8IQ0z05GeHR9ON4YRbzTqhHXLzjRzP0b/dag=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=kvQlug1Yuj0ySnAGW/KmtR8o7OTlcLOPVVjK1zT4mIWY5CsrgUVfADkgQkLpZpNb+i2Pkj1Tx6 EhnL2w72qHa/DbPxwAWQgS/VCVNSjSlSTjJpcUz1zo8S6V4ZDNt608QspZdVgVbHKl3akz3Okn xhMO+Ys7ruqK1V4Sa8tOAS96XSyFwlHsUEjJduSTUHXK6i0NQKsh9VQnP8tLLXWzQE0D5s3oP7 WSKvyuOlB970mK3tTjcd/jxH8e1q8CiMkYREfcG8mjZ9gcoDg6fVJh1KxAdQHPzKNdkvZ4wNbq a1kBtdMfA5hMualVnQ24993GVTw43GWA7XI8cgfGPQ8wsw==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=cED7Tv/6zwpnvpPDFK1aYtF1uvOoJ+JTOecbf9mr2oY=; b=UH7qYsBEZeYf/j0RBcl8nlcH0L ft+91Y6e6afc0DQO16NWRzYrbp9FiKsR3W+hdc0hRYqYSkP4e1sIMjiPSQi6TycxL4H+nUafSmUC5 LkU1Weg5ilvtuJ/mFsNvrb9ieDNw/jwryafKWdDt0ht0vGJ5Fr9/FKSZVVeMIdSwl/oX5vaWDw02U s658bJ3tXcmX/bS4nKdSo85jeGiqujpa6BR4tpxX8NiCaV0Sf1fJgZzVpJV8Erh9vPSwNvAEl0Bld CShP0BWxZVV7XkAFsri0dl+H7pvCwmta2yu9ADGkeHVdR0OkNvDtEWYbChnYgourdzBzKQQLvxs48 irxFIwJQ==; Received: by zero.zsh.org with local id 1pNeKk-00094R-Vx; Thu, 02 Feb 2023 18:29:19 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; 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-ej1-f42.google.com ([209.85.218.42]:40865) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pNeKG-0008Nl-Bu; Thu, 02 Feb 2023 18:28:49 +0000 Received: by mail-ej1-f42.google.com with SMTP id me3so8524268ejb.7 for ; Thu, 02 Feb 2023 10:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=cED7Tv/6zwpnvpPDFK1aYtF1uvOoJ+JTOecbf9mr2oY=; b=Xlk/yY0t5iLUDw41l2myjVh1oWXs4TU4oQAPNCDCIrJeSZ1ipRahrLJhGFLSwdtGKF xwIQ9mMI9lUUn5AJ4ZogkOmb+MGT4eMlguG5Uj5FKSk35DxKNMDRT6H+Od0FzF7d8MWR Hfg4GdXoctk96IwNkA9YwUjkT98gYd6a46b2gkWGgm0cd9K2SyTa9YDPRk3qkKbCh2Pw toxqhcpLkajTbHChLw8Q5nYORc9ON8MCOEWADfcB5c3P3JwUv5a5pf2NnNO0EnVK5T+L LWB/0PLtjPwd7uGLQPEHKGoCqAluxOJ5Mmg3enHORfwVREjJg/nnZflyLOlbW1b733i9 vr9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cED7Tv/6zwpnvpPDFK1aYtF1uvOoJ+JTOecbf9mr2oY=; b=AZl4D1JaH34iJRgjMMKtXFUPByS2lkiQll2/akh2qoAnFXEZFDGhTV2zYJUb6AuJ3D U72kWuouYxX/vKbR+FxAEsX3TFbAUKcwNaPHx2nK1ikQ/ioAHp4oqsBBIsIwU9lNBlbH iIgvSiomMjKs6p07N+bKIzuV8ziqqVB/FSpSftLYYJVlS2Vy/VRM64cB7pM6bvUN+lvG gcqEv5vx+5jLCgZTYD+qvi9vNlUhHztUCRv+dyxT509yXmI+vddwZbiwqYcWykjhfjGu zTT0OTP7TfD11zVOKtEWnbXYtfYFQtVkWiVG4odRnpxR8rdLj1a/1khlMZt38EASBT2a rm8g== X-Gm-Message-State: AO0yUKWHSn5PvX6R4r/29tAbPDa8Z6r378Yq4aeJ4da68Gv9R8NDnlXf QYWgW5CrOZmYG7Z9ObMGjf4L8wvDKFbBnME2+bkumg== X-Google-Smtp-Source: AK7set8sGDQejto9idLrlE9yia26SHPpInzoiQ5pJn+wUm+poIQ+42S/8Ft+QsrpTZJ/1WGfJrKGby/t8iDLbKtpZfo= X-Received: by 2002:a17:906:c005:b0:878:3054:335f with SMTP id e5-20020a170906c00500b008783054335fmr2571592ejz.214.1675362527915; Thu, 02 Feb 2023 10:28:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Thu, 2 Feb 2023 10:28:36 -0800 Message-ID: Subject: Re: time command with shell builtins To: dominik.vogt@gmx.de, Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 28889 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 Thu, Feb 2, 2023 at 10:10 AM Dominik Vogt wrote: > > Well, is there a way to detect inside preexec() wether a command > is handled by the shell or some external binary? If you actually have the command name, you can use if (( $+commands[$thename] )) That won't work (or will be complicated) if the buffer that's about to be executed is a complex structure (braces, subshell parens, while/for/repeat/if/case/select/etc.).