zsh-users
 help / color / mirror / code / Atom feed
* Re: compctl -y problem.
@ 2001-05-25 15:17 Cesar Crusius
  0 siblings, 0 replies; 4+ messages in thread
From: Cesar Crusius @ 2001-05-25 15:17 UTC (permalink / raw)
  To: zsh-users

In reply to "Bart Schaefer" <schaefer@candle.brasslantern.com>
>
>On May 24, 11:44am, Cesar Crusius wrote:
>} Subject: compctl -y problem.
>}
>} When I press <Tab> after aecd, the table shows as
>} expected, but the cursor does not return to where it should. It goes
>} to one line below where I originally typed <Tab>.
>} 
>} Any clues?
>
>Which version number of zsh are you using?

zsh --version gives

3.1.9-dev-6

It also happends independently of the terminal (console, rxvt, xterm),
so the problem's not there too.

>Do any of the lines in the output, particlarly the last line, contain
>exactly the same number of characters as the width of the terminal?

No... Here's a quick test that also fails:

function tests {
  test_desc="asdasd
asdasdas
asdasd"
  reply=(`ls`);
}
compctl -K tests -y '$test_desc' testa

When I try to complete 'testa' I get the same behavior.

--
Cesar Augusto Rorato Crusius                   o      _     _         _
Stanford University                   __o     /\_   _ \\o  (_)\__/o  (_)
e-mail:crusius@barcelonadesign.com  _`\<,    _>(_) (_)/<_    \_| \   _|/' \/
www.stanford.edu/~crusius          (_)/(_)  (_)        (_)   (_)    (_)'  _\o_

He who sacrifices functionality for ease of use
Loses both and deserves neither


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

* Re: compctl -y problem.
@ 2001-05-29 15:41 Cesar Crusius
  0 siblings, 0 replies; 4+ messages in thread
From: Cesar Crusius @ 2001-05-29 15:41 UTC (permalink / raw)
  To: zsh-users

In reply to "Bart Schaefer" <schaefer@candle.brasslantern.com>
>
>(Part of this thread went to zsh-workers ... returning now to zsh-users
>with a workaround)
>
>On May 25,  3:11pm, Bart Schaefer wrote:
>}
>} I know Sven won't be thrilled about being asked to fix anything in the
>} old compctl code ... perhaps we should just remove the `-y' option, as
>} it's new since 3.0 anyway, and document the correct way to achieve the
>} same effect by using the new completion system (which, incidentally, I
>} don't know how to do ... `compadd -d' doesn't quite cut it).
>
>I don't know what the output of `aereport changes` looks like, so it may
>be that there's a simpler solution.  For example, if the same number of
>lines will be returned by `aereport changes -unf` and `... -terse`, this
>will work:
>
>function _aecd {
>  local change_descriptions reply
>  change_descriptions=(${(f)"$(aereport changes -unf | grep -v completed)"})
>  reply=($(aereport changes -terse | grep -v completed | sed -e 's/ .*$//'))
>  compadd -ld change_descriptions -a reply
>  compstate[list]='list force'
>}

This one works perfectly.

Thanks!

--
Cesar Augusto Rorato Crusius                   o      _     _         _
Stanford University                   __o     /\_   _ \\o  (_)\__/o  (_)
e-mail:crusius@barcelonadesign.com  _`\<,    _>(_) (_)/<_    \_| \   _|/' \/
www.stanford.edu/~crusius          (_)/(_)  (_)        (_)   (_)    (_)'  _\o_

He who sacrifices functionality for ease of use
Loses both and deserves neither


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

* Re: compctl -y problem.
  2001-05-24 18:44 Cesar Crusius
@ 2001-05-25 14:26 ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-05-25 14:26 UTC (permalink / raw)
  To: Cesar Crusius, zsh-users

On May 24, 11:44am, Cesar Crusius wrote:
} Subject: compctl -y problem.
}
} When I press <Tab> after aecd, the table shows as
} expected, but the cursor does not return to where it should. It goes
} to one line below where I originally typed <Tab>.
} 
} Any clues?

Which version number of zsh are you using?

Do any of the lines in the output, particlarly the last line, contain
exactly the same number of characters as the width of the terminal?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* compctl -y problem.
@ 2001-05-24 18:44 Cesar Crusius
  2001-05-25 14:26 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Cesar Crusius @ 2001-05-24 18:44 UTC (permalink / raw)
  To: zsh-users

Hi. I am having a problem with the "-y" option for compctl. Namely, I
have

compctl -K project_changes -y '$change_descriptions' aecd

where 

function project_changes {
  change_descriptions=`aereport changes -unf | grep -v "completed"`;
  reply=(`aereport changes -terse | grep -v "completed" | sed -e 's/ .*$//'`);
}


What happens now is this: $change_descriptions turns out to be a table
with many lines. When I press <Tab> after aecd, the table shows as
expected, but the cursor does not return to where it should. It goes
to one line below where I originally typed <Tab>.

Any clues?

--
Cesar Augusto Rorato Crusius                   o      _     _         _
Stanford University                   __o     /\_   _ \\o  (_)\__/o  (_)
e-mail:crusius@barcelonadesign.com  _`\<,    _>(_) (_)/<_    \_| \   _|/' \/
www.stanford.edu/~crusius          (_)/(_)  (_)        (_)   (_)    (_)'  _\o_

He who sacrifices functionality for ease of use
Loses both and deserves neither


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

end of thread, other threads:[~2001-05-29 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-25 15:17 compctl -y problem Cesar Crusius
  -- strict thread matches above, loose matches on Subject: below --
2001-05-29 15:41 Cesar Crusius
2001-05-24 18:44 Cesar Crusius
2001-05-25 14:26 ` Bart Schaefer

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