zsh-workers
 help / color / mirror / code / Atom feed
* The completion for infocmp won't work in Debian
@ 2013-02-09  7:07 Morita Sho
  2013-02-09 12:12 ` Axel Beckert
  0 siblings, 1 reply; 2+ messages in thread
From: Morita Sho @ 2013-02-09  7:07 UTC (permalink / raw)
  To: zsh-workers

Hi,

I noticed that the completion for infocmp won't work in Debian.

  % infocmp [TAB]

will not complete any terminfo that is available in the system.

In Debian, terminfo files are placed on /lib/terminfo and /etc/terminfo.[1]
But infocmp completion won't searches these directories.
According to Completion/Unix/Type/_terminals [2], the current search path is specified as follow:

  #compdef infocmp -value-,TERM,-default-
  local desc expl
  desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo )

[1] http://packages.debian.org/sid/all/ncurses-base/filelist
[2]
http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob;f=Completion/Unix/Type/_terminals;h=59f8d4d8762da7d00d1e9d2a41f42332be00e916;hb=HEAD


Could you add /lib/terminfo and /etc/terminfo to the search path for infocmp completion?

diff --git a/Completion/Unix/Type/_terminals b/Completion/Unix/Type/_terminals
index 59f8d4d..04ece11 100644
--- a/Completion/Unix/Type/_terminals
+++ b/Completion/Unix/Type/_terminals
@@ -2,7 +2,7 @@

 local desc expl

-desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo )
+desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo /{etc,lib}/terminfo )

 _wanted terminals expl 'terminal name' \
     compadd "$@" - $desc/*/*(N:t)


Regards,

-- 
Morita Sho <morita-pub-en@inz.sakura.ne.jp>


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

* Re: The completion for infocmp won't work in Debian
  2013-02-09  7:07 The completion for infocmp won't work in Debian Morita Sho
@ 2013-02-09 12:12 ` Axel Beckert
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Beckert @ 2013-02-09 12:12 UTC (permalink / raw)
  To: zsh-workers

Hi,

On Sat, Feb 09, 2013 at 04:07:27PM +0900, Morita Sho wrote:
> I noticed that the completion for infocmp won't work in Debian.
>
>   % infocmp [TAB]
> 
> will not complete any terminfo that is available in the system.

Depending on the installed packages, this is indeed the case.

> In Debian, terminfo files are placed on /lib/terminfo and /etc/terminfo.[1]
[...]
> [1] http://packages.debian.org/sid/all/ncurses-base/filelist

That's not completely true. Debian places terminfo files only in
/lib/terminfo and /usr/share/terminfo. The only file in /etc/terminfo
shipped by Debian is a README file.

/lib/terminfo contains only the most important terminfo descriptions
and is installed by default. /usr/share/terminfo is only filled if you
also install additional terminfo descriptions from the ncurses-term[2]
package -- which I do on all my systems, hence it worked for me. :-)

[2] http://packages.debian.org/sid/all/ncurses-term/filelist

/etc/terminfo is for system-local terminfo descriptions and to be used
by the local admin, not Debian. See /etc/terminfo/README.

But Morita is right in the sense that Debian by default only ships
terminfo descriptions in /lib/terminfo and that it also looks for them
in /etc/terminfo.

Actually this has already been reported against Debian's zsh package
as http://bugs.debian.org/600151 a while ago, but we seem to have
missed it as "to be reported to upstream". Thanks for bringing this
to my attention again!

> Could you add /lib/terminfo and /etc/terminfo to the search path for infocmp completion?
[...]
> -desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo )
> +desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo /{etc,lib}/terminfo )

I'd be happy about this patch being applied to zsh in general. (BTW: I
expect that the order of the directories is not relevant here.)

	Kind regards, Axel (with his Debian Zsh Team hat on :-)
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.asciiribbon.org/              | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


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

end of thread, other threads:[~2013-02-09 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-09  7:07 The completion for infocmp won't work in Debian Morita Sho
2013-02-09 12:12 ` Axel Beckert

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