Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Subcommand dispatcher and alias factory
- X-seq: zsh-users 23607
- From: "genelocated" <genelocated@xxxxxxxxxxx>
- To: "Leonardo dos Reis Gama" <leonardo.reis.gama@xxxxxxxxx>, "zsh-users" <zsh-users@xxxxxxx>
- Subject: Re: Subcommand dispatcher and alias factory
- Date: Sat, 8 Sep 2018 13:58:37 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1536386754; bh=BIKMVp27GV6DQ73RFDYVp4RVtnCGS0/QC7vVr2lOlmI=; h=References:From:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:Date:Message-ID; b=caRXMNA/NztuHKmHLrlnC9CTHfmA8UN8IffgLYDmaNlOHb1AkxtLQSg0p9KEBrZJX wJj58xvlds55ob2NvogBuXtlrkEUHd/Ei2nu/CHgJ6Wcpz//lvIHFt76sfaVIPHCMS rVO8t6P+og9j5YkDTXayU2DCMIlapH+Cy82Uwcpc=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAAJJbEUL_PAN08p6fGKQEhajLGQkociru+UYvpV-7x+aN2uYxA@mail.gmail.com>
You may like this...
https://github.com/ktr0731/salias
---Original---
From: "Leonardo dos Reis Gama"<leonardo.reis.gama@xxxxxxxxx>
Date: Sat, Sep 1, 2018 05:55 AM
To: "zsh-users"<zsh-users@xxxxxxx>;
Subject: Subcommand dispatcher and alias factory
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
<https://about.me/leogama>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author