From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17843 invoked by alias); 31 Aug 2018 21:55:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23596 Received: (qmail 19459 invoked by uid 1010); 31 Aug 2018 21:55:22 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f44.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.44):SA:0(-1.9/5.0):. Processed in 2.030297 secs); 31 Aug 2018 21:55:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID,T_REMOTE_IMAGE autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: leonardo.reis.gama@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=GnpAHY5Uxs0VAzyE6x6HeRcaEYPEEGfHe6YsnuyQxII=; b=UODcrFxBGzGVSzafTZt3ToLjrNo9tKx2rIElryqKoNarLO+J2MYadFh6vP1hy6qhv6 jnDKAbe7OX2UYI2X7Un1YDc/BOi95MdrZrIKt4Wk3IJyoxH8+waYNIMew8R7QYkOWls+ IFA3luPEQEJyciYkNrLVLOTMCtFS2T9VDtD/VaW8j1ofjtIwTZg21tgvUDJeYl+uT1hk MrZOg8vml4gYmEq7cTG8iYAy1fqiPtCM9aWazIGkS7d6e/2SbiUx6ZkFQ9I1CmrxjbXu V+4tbDCYyGSwOooo1fevN9KmL8s16BYNYdsq5GaTrhdFs1mv+izOqyp+aCV4uwrN1vlK ZN/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=GnpAHY5Uxs0VAzyE6x6HeRcaEYPEEGfHe6YsnuyQxII=; b=Rq+pTywIfxLCfJ6NRfqr5mH4WGA66MYIKSoxL45owNKap9btFyWamrp6gNRc8R7ZVi rZFS+uo/zfS17SmwMpPToEz08VgvBMgPPbUWJJU//yRVsr+r0bmvCeC3wTrSuO14Kobo DIlF6w0mQtRBc0MBnPqvLXiH/HQjOVJ5YzB1ExXKLf64MYMeSaM9G8L2dBlRwWEhwqF7 TD5+chml8sd9EnhxfduKt8yIvIXszaCw3Ctkp4twEBfLsioewlYqJJsu0H1al8TPfDzD egt/+xqandvfvRyGlztwN7+3gNawjjlHULHgyLjIC0xIJe20AkEBExnmt811pRVLBkM1 uCLQ== X-Gm-Message-State: APzg51DjGfEYBxpGVU9iEWxZaSk2qBedJdSDcScc3mTAR2BO3xuyTD1v 46lV85oiKvLvk5G+qCACsvUJWCxSVOnkM9DpzR/3Vqpo X-Google-Smtp-Source: ANB0VdaP9FTyIotRXljOuqYHCS1sl0JCzpG6qadaCZLZcaHtkvT5JdSPSOgUc1QdZv0tHa1a/nFPPpO19ZuNRsnEkxI= X-Received: by 2002:a1c:3e8e:: with SMTP id l136-v6mr5820812wma.72.1535752515899; Fri, 31 Aug 2018 14:55:15 -0700 (PDT) MIME-Version: 1.0 From: Leonardo dos Reis Gama Date: Fri, 31 Aug 2018 18:54:42 -0300 Message-ID: Subject: Subcommand dispatcher and alias factory To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="0000000000002c555e0574c23f5e" --0000000000002c555e0574c23f5e Content-Type: text/plain; charset="UTF-8" Hi there! I'm new here... It's a common theme: you have a program with subcommands and want to alter its default behaviour somehow (what would be easy to do for a common command with a simple alias or function). Or, if you feel adventurous, you may want to create your own subcommand. Git, for example, solve both problems seamlessly with its "git aliases" and by looking for a "git-myfancysubcommand" executable in your path when confronted with an unknown subcommand. Is there any zsh plugin that implements either of these features for *any command*? I could not find one. If there isn't such a thing, I would be happy to create it! Some previous discussions about the issue: https://unix.stackexchange.com/questions/48862/how-can-i-create-an-alias-for-a-git-action-command-which-includes-spaces https://www.zsh.org/mla/users//2014/msg01067.html https://stackoverflow.com/questions/34748747/can-i-alias-a-subcommand-shortening-the-output-of-docker-ps https://stackoverflow.com/questions/40654352/how-to-write-an-alias-for-two-words https://eklitzke.org/bash-subcommand-aliases Thank you for your attention, Leonardo Gama [image: https://]about.me/leogama --0000000000002c555e0574c23f5e--