Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: new shells completion type

On Wed, Jun 22, 2005 at 11:11:58PM +1000, Doug Kearns wrote:
> Here is a new completion type for shells. It seems to me that if we're
> going to complete shells from /etc/shells then it should be restricted
> _only_ to shells listed there. This will change the behaviour of useradd
> completion which always included /bin/false.
> Any objections?


One sometimes wants to set a command that is not in /etc/shells
as the login shell on purpose (like /bin/false) to disable FTP
access. That could be "nologin", a script, whatever...

> diff -u -r1.10 _screen
> --- Completion/Unix/Command/_screen	11 Jun 2005 12:28:17 -0000	1.10
> +++ Completion/Unix/Command/_screen	22 Jun 2005 12:36:08 -0000
> @@ -76,7 +76,7 @@
>    '-q[quiet startup, exit with non-zero return code if unsuccessful]' \
>    '-r[reattach to a detached screen process]: :->detached-sessions' \
>    '-R[reattach if possible, otherwise start a new session]: :->detached-sessions' \
> -  '-s[shell to execute rather than $SHELL]:shell name: _command_names -e' \
> +  '-s[shell to execute rather than $SHELL]:shell:_shells' \

As far as screen is concerned, that doesn't need to be a shell,
one might prefer to use "mc" or "elinks" or "emacs" for instance.

> +else
> +  shells=( ${(M)commands:#*/((|[abckz]|tc|ba)sh|false)} )
> +fi

What about dash (debian ash), rc, es...


Messages sorted by: Reverse Date, Date, Thread, Author