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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1697 invoked from network); 13 Feb 2023 11:25:00 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Feb 2023 11:25:00 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1676287500; b=e5GlhMifff4WBE9DuD+dwC8Zj2Mysvj9typlgOI0eEyGIRB9GGvYAighjAOngVVTqqQBa273qr NBrlRtNaRK7WY80Xp9V2DniF6INCXjVwzduouzmiunMkheLomIOdfRiwtbBF6MCU5TyiP+EDJ9 fadjDd5Kdsotc9W1FcXfyUb1uPwT9zBmDBFqw1HVVUdQPaDzxflpekmx/3/uQ9ocQ6IiRoc0kq ek7IBEUgzMY6RqbD6dVvFhVTyVVWMW8kK5vkOtKZtUrOqkr5ofhlvU+PrDtCxEP3IhkM88rHfW vsfY2xGVHt5QeAyhIOKC4J83Pbh42krR/akEos7DOMDVgQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f176.google.com) smtp.remote-ip=209.85.208.176; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1676287500; bh=Zq+8CXcmC6ywTJxd0hpLeSFYHJytrSoFrZKOVhgHV3o=; 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=V+NMLjInwRZQBQUPozcD95OnESI9xfRj1U9AcW890R2VgwCj7/cnE/fpQPjeG/t17WODS4fL4x +SttIycbfVdwhTtN+Sz0Q4GYNIQ0qw7gm41Xc6h9+rlCm5hIC6JN0OXCFle/7CLguRzOS3kw79 Iv/wjUsVS6qf5Gfhkuh8HsLeulFgJgzaEHpR6xUSDLuV2QHoKK1ueeoXokRbNxUDi3l3y5DN7B nB4cJc4C0340RhvhzWARAuFo+Tj00iCXdYX1gs+rtc35MF/Frse+ua8m2ZVZ8zVrQaKwOd4aA5 Vj1IwlOJrJaEo9szoBzPKy00sda3Rjz6g07Cg9w8qJ+Yeg==; 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=krhaG8qfYKj0wnulYk+BPcHVeJ2fVl0447okD5eQ8Ac=; b=J4vmuJ9F1GpCZnMJ4jQzN+hv57 c9Z4PpAx+BnSnAiYeS9U5LlPftl1tAHzD1YXuCT973F8MYozY7oBv8mtl7DYYs7dMhACkg7JKevqN BUUVQKojFWQbQ3lWwHf2/IsGI9is7eH7VxlLEZg+MYqp0sKOXi/qG6IRIYk868qwMr6wVwxZ0Y3s2 8qFd1QEAlmd3Zke79RSblNbuzO1AvGnck6Q/kEYiDRt+8Pyu3i81dVTSG28R3mVv7hMzwq7QXB+ai b1I6M7vNVPbxEAIUivZ+JG15IpIFRc4uLbz1Tm1+AhIArwWQPLgB5gPE4ligeDBbVSW3LPkivBJ2Q ja/iW1Cg==; Received: by zero.zsh.org with local id 1pRWx9-000BdZ-Nm; Mon, 13 Feb 2023 11:24:59 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f176.google.com) smtp.remote-ip=209.85.208.176; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f176.google.com ([209.85.208.176]:33731) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pRWwc-000BJy-AP; Mon, 13 Feb 2023 11:24:26 +0000 Received: by mail-lj1-f176.google.com with SMTP id x29so14354000ljq.0 for ; Mon, 13 Feb 2023 03:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=krhaG8qfYKj0wnulYk+BPcHVeJ2fVl0447okD5eQ8Ac=; b=CKLGN4BpRE4T4J6T0ehD9qr8B4N9MG5BOAO/w2iPxjnXLBWn3tgJvXI2O5u3YqeU2S 7uKIwD/vOfi4xHwp9GAf77bOxfBppIG6N2Bmw2Gni3FcHU4hY6E1w7a5hlAw3+qlmq9o ZmH8yiOzS8Wc4ZYzwGIU1pjC+rCB6uceBYJsKIPGDXT8Ns6MDY5r2DUWmGk+OZfdByKp Xt2ZtZalgbWUyEMWfsIdxDph2L6DObsZAlHuu7FkTXBheAXQJp33NsSRtdHZ8/iZ7+Oa 0bURZ8aKi4atDElfhTSgKKIGGaKzINDLNXduaR55XPhidCz1H0poCfTTAgXTYGNuGtGF +HFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc: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=krhaG8qfYKj0wnulYk+BPcHVeJ2fVl0447okD5eQ8Ac=; b=WzmVdLwg8FcgzJpM2iEz1bm2IcT5HMxQXpyaukbtaX3WyaNZWYbyL2tsaBBiFH6tbp 3HNj8RAulLuPITtK2jLIE9OFzEUQ/qAZmOYmYfCXkGliIC5eGRvo/qHR4zfjZfEstd4y rIM0JXJ6IqJtxF/Z6/PRkgMmX05OIgXPAG/pnNwdndpf15wbGekGXPxkEq2EZTfJytx5 bXNjRisFzbszBomSjjHH1iTRHOz1ZMzP8JgG5mZpOrq1e7oZx9nKXTsFgNC5k+0SjQ07 OwzD1yoHrPZn8N9er69IN9AoDRPICVjIFdQUjlGBEX2i7NgYkX9Qj4JBsC99PC7lxteq 0G8A== X-Gm-Message-State: AO0yUKXO3CrCHROkrbckunkcXxczQEJvTxSI2PZi2VW/KWOmLwG8BKCe NSpfmwSJsFBNDeVUsSQjt493EtY+VKIReI95lRo= X-Google-Smtp-Source: AK7set/RV8sKJgoYXxUaMFiC8vnz1607e+GBzjT+DxQig4tQRElIk+RuSeTq5XG/bXAcKkxS8Zf/BLA59O/YElESJvk= X-Received: by 2002:a05:651c:110:b0:290:4f23:f72a with SMTP id a16-20020a05651c011000b002904f23f72amr3846298ljb.197.1676287465202; Mon, 13 Feb 2023 03:24:25 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Mon, 13 Feb 2023 12:24:12 +0100 Message-ID: Subject: Re: --init-file option To: =?UTF-8?Q?Kalm=C3=A1r_Gergely?= Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51423 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: On Mon, Feb 13, 2023 at 11:58 AM Kalm=C3=A1r Gergely = wrote: > > I was wondering if there is an equivalent to Bash's --init-file > option or fish shell's --init-command option in Zsh or if one can > hack around to achieve the same effect. I would need to be able to > source a virtual environment activation file after the Zsh startup > files were processed (but before a command is executed) in order to > be able to start a shell or run commands inside a Python virtual > environment. If you are executing a script or a command, then instead of this: zsh foo zsh -c 'foo' you can do this: zsh -c 'source /path/to/your/file; foo' If you need to start an interactive zsh that sources an extra file after the usual startup files, and if you cannot modify any of the standard startup files, then https://github.com/romkatv/zshi or something like it is the only option. Disclaimer: It's my project but I'm not using this code myself. P.S. This question is more suitable for zsh-users than zsh-workers.