Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Subcommand dispatcher and alias factory
- X-seq: zsh-users 23606
- From: "genelocated" <1273365510@xxxxxx>
- 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:56:44 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1536386644; bh=zCB6BOaFGclRf58RSenjuXgc3fkF4WQgdIAs7mA1XaM=; h=References:From:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:Date:Message-ID; b=f4ltOLeIjQziRB4/ZTSzSSADC7hwad4R26srMxQCvc4wAk1Xnr7r0mO6+vhmgKnHO favgCzvZJS7nste12yg9T6KBHF1VKmkDW4MLiSyuPZDKSpB/h3MrZy3FAozRTc9+zm y+TRdsKnc/XKIpO0mV/k+w/OwGuUzTw3q5MUgQsw=
- 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