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 2197 invoked from network); 4 Sep 2021 16:22:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Sep 2021 16:22:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630772567; b=CqnieGot6iDgiTA6GAtI0d7IbolYuhoe1uXiyrvzrNvwr+rfOmlVvf1EWEo50giveUSH48K2eY a1e5Vq5sjPNNzYFxeUdgPvQG3oQ1R7UhYRm/MO1Z/X/6zY1vkU06h83Om11sbJtfmPQBzTYt3P GRkX+WFL1gOMEG3lGtRnB1oqwFU4xHc52ab7JE/M3uaqqv0GQuoD8oKaHHM48ycsD2sa0ZDHUD hvZ8BblMnNVRWuScgB/va6iHZIRX8ZxgVXtPZgTftoKLrLjKz8apI/Lppfzpyenzat7leak2/3 CQcAIM3g69dSIPZ7BjyTFdKG7c9KzNbvIp7ESFMpTdlJNA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (humanalyse.com) smtp.remote-ip=18.184.242.35; dmarc=fail header.from=fruitcom.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630772567; bh=QfyKCmtnhelamICGfcB9raPdzR0Rsvdf98Q/97GWBp4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature; b=EIG5z1jK2AKU3PsAwMLlbfyIyH6ffYJ4pbRmETVo0zaUzo1YiXB60ejaWgQH/q4AajKfps+reG SHOA+JwhpggOnCPp5A7oTkgw8mIGkTYjOXhOtF3FvNxJIBIlqVNC6CL7622WzCdvbtATFCiIaS D2Ij9GDk+1zF/uPSkuuc4KVSOz4wouzxwmZYGLpwAN42QNdnTK98z0+JethZMDlQ7i8QoxQWnD IvWHB0ezFVve9NgQVFMP5KWWahvJm5+42GZcvQx1XGWftFfubLrWc+DPR3xbhGjLa2iSX0Ikx2 4hNMpTIN+bSmU2fLnigHa9GlPo9g4RbLKC4jqRid3sI/XA==; 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:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=HLkW+vKvq7wxB5M0F3Wr9cseFkxUu+PR4ixUe8yW+ZU=; b=CWTB/5+2HUYZr/xHYkWRy42Ze9 voSDfYBlWcS7IdmW5HCeZqOcSQ5OIKEoaAruN9rWAapt2MXdmGwxnHZPtDb8zWkc8Akv/EfdvP7bY iezzxJ/u8RXc1ZkRB2OjyU4eEchFBw77bXt4OJYLty+VVkSh1GR9kbsho6tf76GdJybnmKK9JRPDo wmPCmzCCfIzbhfhAATgtEY+WYa08R7YJOUtZkj013w31OU+QPMFIyj5Z1u1NkUS9yTQeMPhGQxFqr kb9Y05+PKeJ/c5uHkUZ0icifI6BIMuPW9qSw6q9yEpLBVTWgc2n+VSQpx+Sbx7gRt6/4CvZFKybjc jymD3pWQ==; Received: from authenticated user by zero.zsh.org with local id 1mMYRK-000KsZ-3T; Sat, 04 Sep 2021 16:22:46 +0000 Authentication-Results: zsh.org; iprev=pass (humanalyse.com) smtp.remote-ip=18.184.242.35; dmarc=fail header.from=fruitcom.com; arc=none Received: from humanalyse.com ([18.184.242.35]:58516 helo=trustfood.org) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mMYQL-000K93-SW; Sat, 04 Sep 2021 16:21:46 +0000 Received: by trustfood.org (Postfix, from userid 1001) id 12005E351; Sat, 4 Sep 2021 18:21:45 +0200 (CEST) Date: Sat, 4 Sep 2021 18:21:44 +0200 From: Eric Smith To: zsh-users@zsh.org Subject: Make a function name an alias for another function Message-ID: <20210904162144.mwx5h6pj3rp33lgf@trustfood.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-ACL-Warn: DMARC DEBUG: should REJECT message from fruitcom.com failed sender's DMARC policy, but not being strict yet X-Seq: 27081 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: Hey zsh-ers, I would like to have a function defined in one place. POST() {curl --silent -X $0 -H "Content-Type: application/json" http://admin:3/api/$@ | jq '.'} GET() {curl --silent -X $0 -H "Content-Type: application/json" http://admin:3/api/$@ | jq '.'} DELETE() {curl --silent -X $0 -H "Content-Type: application/json" http://admin:3/api/$@ | jq '.'} Not three like this. How can I make like POST() = GET() Then I can call GET() and it will run the same function but return of cause an alternate $0 Thanks for any tips. Best wishes Eric