zsh-users
 help / color / mirror / code / Atom feed
* completion for "su -" does not work
@ 2016-11-10 20:46 Fourhundred Thecat
  2016-11-10 21:26 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Fourhundred Thecat @ 2016-11-10 20:46 UTC (permalink / raw)
  To: zsh-users

Hello,

completion for the su command has many fancy features. For instance,

  su -s <TAB>

will offer all available shells on the system. Very nice, but I wonder
if I will ever need this. However, basic completion does not work:

  su - <TAB>

does not offer me anything. In bash, I could do

  su - <TAB>

and it would offer me available users, to which I could switch. Are
there any plans adding support for "su -" completion ?

(tested on zsh 4.3.17)

Cheers,


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completion for "su -" does not work
  2016-11-10 20:46 completion for "su -" does not work Fourhundred Thecat
@ 2016-11-10 21:26 ` Bart Schaefer
  2016-11-11  7:53   ` Fourhundred Thecat
       [not found]   ` <582578F3.4070507__28604.2762142189$1478851220$gmane$org@gmx.ch>
  0 siblings, 2 replies; 5+ messages in thread
From: Bart Schaefer @ 2016-11-10 21:26 UTC (permalink / raw)
  To: zsh-users

On Nov 10,  9:46pm, Fourhundred Thecat wrote:
}
} Are there any plans adding support for "su -" completion ?
} 
} (tested on zsh 4.3.17)

4.3.17 is almost 5 years old.  Before asking if there are "plans" you
should be trying a newer version.

There is user completion following "su -" and has been since 5.0.8.
There have also been updates for "su" variation on different OSs.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completion for "su -" does not work
  2016-11-10 21:26 ` Bart Schaefer
@ 2016-11-11  7:53   ` Fourhundred Thecat
       [not found]   ` <582578F3.4070507__28604.2762142189$1478851220$gmane$org@gmx.ch>
  1 sibling, 0 replies; 5+ messages in thread
From: Fourhundred Thecat @ 2016-11-11  7:53 UTC (permalink / raw)
  To: Bart Schaefer, zsh-users

> On 2016-11-10 22:26, Bart Schaefer wrote:
> On Nov 10,  9:46pm, Fourhundred Thecat wrote:
> }
> } Are there any plans adding support for "su -" completion ?
> } 
> } (tested on zsh 4.3.17)
> 
> 4.3.17 is almost 5 years old.  Before asking if there are "plans" you
> should be trying a newer version.

fair enough

> There is user completion following "su -" and has been since 5.0.8.
> There have also been updates for "su" variation on different OSs.

I have installed zsh 5.2, but su - behaves same as on 4.3.17, AFAICT.

  su - <TAB>

does not complete users, it only completes files/dirs in CWD

  zsh --version
  zsh 5.2 (x86_64-debian-linux-gnu)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completion for "su -" does not work
       [not found]   ` <582578F3.4070507__28604.2762142189$1478851220$gmane$org@gmx.ch>
@ 2016-11-11  8:42     ` Daniel Shahaf
  2016-11-11 10:37       ` Fourhundred Thecat
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2016-11-11  8:42 UTC (permalink / raw)
  To: Fourhundred Thecat; +Cc: zsh-users

Fourhundred Thecat wrote on Fri, Nov 11, 2016 at 08:53:23 +0100:
> I have installed zsh 5.2, but su - behaves same as on 4.3.17, AFAICT.
> 
>   su - <TAB>
> 
> does not complete users, it only completes files/dirs in CWD

That has already been fixed for 5.3:

% git log zsh-5.2.. -- **/_su | me
commit cf01ad96d4758c602b41df59bf0fe1330a88b800
Author: Oliver Kiddle
Date:   Thu Jun 9 22:51:18 2016 +0200

    38639: fix username completion after -, update options and get user shell with getent

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completion for "su -" does not work
  2016-11-11  8:42     ` Daniel Shahaf
@ 2016-11-11 10:37       ` Fourhundred Thecat
  0 siblings, 0 replies; 5+ messages in thread
From: Fourhundred Thecat @ 2016-11-11 10:37 UTC (permalink / raw)
  To: zsh-users

> On 2016-11-11 09:42, Daniel Shahaf wrote:
> That has already been fixed for 5.3:
> 
> % git log zsh-5.2.. -- **/_su | me
> commit cf01ad96d4758c602b41df59bf0fe1330a88b800
> Author: Oliver Kiddle
> Date:   Thu Jun 9 22:51:18 2016 +0200
> 
>     38639: fix username completion after -, update options and get user shell with getent

thanks, I extracted the new completion file

  cf01ad96d4758c602b41df59bf0fe1330a88b800:Completion/Unix/Command/_su

and it even works in zsh 4.3.17

thanks a lot,


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-11 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10 20:46 completion for "su -" does not work Fourhundred Thecat
2016-11-10 21:26 ` Bart Schaefer
2016-11-11  7:53   ` Fourhundred Thecat
     [not found]   ` <582578F3.4070507__28604.2762142189$1478851220$gmane$org@gmx.ch>
2016-11-11  8:42     ` Daniel Shahaf
2016-11-11 10:37       ` Fourhundred Thecat

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).