zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Pier Paolo Grassi <pierpaolog@gmail.com>,
	Zsh-Users List <zsh-users@zsh.org>
Subject: Re: completion functions not loaded
Date: Sun, 12 Feb 2023 13:53:05 -0800	[thread overview]
Message-ID: <CAH+w=7a=j_dEzPGghLwNb_ZVa8oTMNf4ztwXrL65CiHDXred4g@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMpHbUru2BkOLUVxJT8sLbELoJ+_Uin+gBo2gUkCV98LBA@mail.gmail.com>

On Sun, Feb 12, 2023 at 1:08 PM Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> On Sun, Feb 12, 2023 at 9:58 PM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
> >
> > alias systemctl='sudo SYSTEMD_PAGER= systemctl'
>
> If you replace the alias with a function, it'll complete nicely.

sudo completion is supposed to know how to look ahead.  As written
above, the completion context is

tags in context :completion::complete:SYSTEMD_PAGER=::
    use-compctl    (_default)
    globbed-files  (_files _default)
tags in context :completion::complete:sudo::
    argument-rest  (_arguments _sudo)

The alias would work if it were instead

alias systemctl='SYSTEMD_PAGER= sudo systemctl'

Maybe this indicates need for a fix to _sudo


  parent reply	other threads:[~2023-02-12 21:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 21:18 Pier Paolo Grassi
2023-02-11 21:27 ` Bart Schaefer
2023-02-11 21:30   ` Pier Paolo Grassi
2023-02-11 21:31   ` Bart Schaefer
2023-02-12 17:22     ` Pier Paolo Grassi
2023-02-12 17:41       ` Bart Schaefer
2023-02-12 17:52         ` Pier Paolo Grassi
2023-02-12 18:13           ` Pier Paolo Grassi
2023-02-12 18:27             ` Pier Paolo Grassi
2023-02-12 18:36               ` Roman Perepelitsa
2023-02-12 20:58                 ` Pier Paolo Grassi
2023-02-12 21:08                   ` Roman Perepelitsa
2023-02-12 21:09                     ` Pier Paolo Grassi
2023-02-12 21:53                     ` Bart Schaefer [this message]
2023-02-13  8:23                       ` Roman Perepelitsa
2023-02-13 10:01                         ` Pier Paolo Grassi

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='CAH+w=7a=j_dEzPGghLwNb_ZVa8oTMNf4ztwXrL65CiHDXred4g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=pierpaolog@gmail.com \
    --cc=roman.perepelitsa@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).