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 26332 invoked from network); 24 Jan 2023 23:37:46 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Jan 2023 23:37:46 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674603466; b=lBlYfFqjrslH5UivcNt+EKkXtdWPJgJhlN3RskLD2I+niBoBpUCqbcvhOdZKMTjvd2lUBnC5uY 2eV+SRchqKOKQlvN0s6JVMr2FARh0GmgpR6eOrAV7tXP8LYhkcYnaYb1raYP1yHlr/EBThBOWk LfI5/jVxEy+22jsZWSX83e29xWDmni0a82QDoJx2GS47v03qCc04JxNlszfoD2x2z19vonsjMV 3anvRdL8g/FlcPM1pPU6ZbijhSNVoNI7QSuL+HjFjVWRGThwkQNb01FiimiziWyA6tu7WQsj+s Yj2rcrrAjM5kKbZSgKrHBu9Hn0Jdzn0p7PU9Q80Jzdqstw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; 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=1674603466; bh=0ruH7VweXK4nNyijhmNtjBNrTHlHgiAPgpUrUXsHzSA=; 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=aQcutxESQlh9xYVAOGK2dTjrhVdcS89tP1Nc7DXtqm8YeIb00aiR3D2YbsjeCysxH6SRHgbNPI fbcNb42PfSmmxPeSF/GVDJ4KtmDvhaLzW5D1cW/GAewGnt2+FCCsNsAOcfFflNbjd3ed6qcjlK vthg8YNRbdtwXig75Agakhr4lXCdPd8G47caQmCq24LwY6JXoCxJE1fkRYZplx2GINM6JbHr4o wsN1+1nGxnFCR3ANKYKzDKhj+r9z3PMFTOBAPhaEioTBvdZTODtnLMysofF6CwMojTXGLJ/0Ai hZikK1AD1Y/2PlOHRE/rUvi5gO4kJA9R7zdaww1yYzfKlA==; 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=/gpbB2CdqaVLzCm+SpZxeWF70MVr+QJYzNSSBrQQBxA=; b=E/NhFp/100eTsKzYg0kWqlRX0b qIxZ4p5QZRJUetG9+1lVbZL6Nsihalr+IPIZ/Le3ESlzTfnJBfyz8GNtKJHSNAknOnezSe/nBXWIm vFVLa6YVwo3x1KBNL7JmQTAPma+vpilYn3g3VnNdx3RkFfzAm59tgQl+csvQwxKqSXTSP63DSr2ZE xThk0cFxrXvmupkxAfJRDwzYyvtHHz94MMSGZy/1zKlgLKmLv55OB62MYHaXPGE6g4unNPFm4gUbt 5AMsRacxrgMEzFrddNymGenIHfWUJMMdTRwH+BeSMHMU8sgr9HPnTrtUu/AEGU/Zc4mADd67X2g11 BtYCHfkA==; Received: by zero.zsh.org with local id 1pKSrK-000Aso-14; Tue, 24 Jan 2023 23:37:46 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; 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-f53.google.com ([209.85.218.53]:44863) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pKSqd-000A9a-6Y; Tue, 24 Jan 2023 23:37:04 +0000 Received: by mail-ej1-f53.google.com with SMTP id ss4so43178866ejb.11 for ; Tue, 24 Jan 2023 15:37:03 -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=/gpbB2CdqaVLzCm+SpZxeWF70MVr+QJYzNSSBrQQBxA=; b=5UF+S7+ANeHxlM5lxRumMt+BxriAn2FmOw0e7ISTTicV7qRPsLrQdMKK6GXbFp+zrA iP+lqTVuuZU/zwN8YH8pq1OpwbKf0Chodksq2Qw/XaxE9gRNBiu7p8ZTPV1btY5aWhmF lPsn8mVpidCULZPjvuTW2p60A2yF6FG7q8irkLD8v3xGnVGHzbM24QMotadOhtHW2Moa ORAF38MTXyqCN1yC0ebSHdCfs7X+6C6ZwypLRbxBmOOW9xUOPA35IyI4OGlqtq37BFxz L4Lk1euHwoluDDnWyIHfvsGtj901v7NTNHtz6w9rR0ES2fvukpslXnihpxd++nsvBOSF f85Q== 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=/gpbB2CdqaVLzCm+SpZxeWF70MVr+QJYzNSSBrQQBxA=; b=0JCZuuttl1HP1FZfs8oUfvlYFUivQLBx6xLBjToRLLkftdf0LiKB6yRmCZKouzjTm1 CdM74J4xt9V2iiJU3RyfVzIgrhJ9v8JEa7GvGG6G5QfSqLHe1uuZ9kA4rK1n7wlp8ymS U3ZYNq/uiP85w/Vjqy1fqOQO6iikVrWgttJAhp4//gNKz6lDax1aeNQgjxFmcM/7l1A3 uUNjqzVS+rj3c9bmhiZYEJaGVvrAA8xc/YoYhLA47EdNT6Sxe7eOJbfQ21w7iddBom/z eZrf1mu/EETdEfAEnU/3AEuUM1HDaDCu21sl6MBJFtO5FBsHTT3V/+QFhyUv1Nq91eGe vp8A== X-Gm-Message-State: AFqh2kp719XWmivm0jM9ws2ImMOoQU0KIfgRtm9YirNWkfz2cn51gJAa 0nur7WMrqK38i9iFtV0npW6Pyk38OfRzouC60btXfQ== X-Google-Smtp-Source: AMrXdXvn7WmwUtrKrc0U7hiu+H4f9noj9dF4b72tqD2qhJA2cyTuBiXbHjtZU6URLD8Cg5XSa+jaV54M00xcmL4Q+uY= X-Received: by 2002:a17:906:3741:b0:82d:1d5f:2618 with SMTP id e1-20020a170906374100b0082d1d5f2618mr3689221ejc.107.1674603422948; Tue, 24 Jan 2023 15:37:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Tue, 24 Jan 2023 15:36:51 -0800 Message-ID: Subject: Re: time command with shell builtins To: dominik.vogt@gmx.de, zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28775 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 Tue, Jan 24, 2023 at 3:14 PM Dominik Vogt wrote: > > As far as I understand there's no reliable access to > which command is being executed in preexec. There's reliable access to what the user typed and to what that expands to after alias replacement. What else would you be looking for? preexec Executed just after a command has been read and is about to be executed. If the history mechanism is active (regardless of whether the line was discarded from the history buffer), the string that the user typed is passed as the first argument, otherwise it is an empty string. The actual command that will be executed (including expanded aliases) is passed in two different forms: the second argument is a single-line, size-limited version of the command (with things like function bodies elided); the third argument contains the full text that is being executed.