zsh-users
 help / color / mirror / code / Atom feed
From: Leonardo dos Reis Gama <leonardo.reis.gama@gmail.com>
To: zsh-users@zsh.org
Subject: Subcommand dispatcher and alias factory
Date: Fri, 31 Aug 2018 18:54:42 -0300	[thread overview]
Message-ID: <CAAJJbEUL_PAN08p6fGKQEhajLGQkociru+UYvpV-7x+aN2uYxA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

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>

             reply	other threads:[~2018-08-31 21:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 21:54 Leonardo dos Reis Gama [this message]
2018-08-31 23:01 ` Bart Schaefer
2018-09-03 14:07   ` Daniel Shahaf
2018-09-08  5:56 ` genelocated
2018-09-08  5:58 ` genelocated

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAJJbEUL_PAN08p6fGKQEhajLGQkociru+UYvpV-7x+aN2uYxA@mail.gmail.com \
    --to=leonardo.reis.gama@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).