Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Subcommand dispatcher and alias factory
- X-seq: zsh-users 23596
- From: Leonardo dos Reis Gama <leonardo.reis.gama@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Subcommand dispatcher and alias factory
- Date: Fri, 31 Aug 2018 18:54:42 -0300
- 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==
- 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
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