Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Padding and length calculation of arguments ($...) is broken #158

@irssibot

Description

@irssibot

I currently have irssi 0.8.4 (and since I use the debian packaging system, I am not likely to update to a non-deb version).

The bug reported here may thus well be inexistant in latest versions. Sorry for reporting a bug that is perhaps already fixed and/or specific to my debian version.

The bug is :
When I use aliases in formats, I get very odd things concerning arguments. For example, when I set (with every other setting leaved unchanged from default irssi theme) :

msgnick = "%K<%n$0$[15]1%K>%n %|";

I do not get what I want, i.e. the width is not every time 15.

So I try :

msgnick = "$@1 - %|";

And I get (surprising!) the length in characters of... the message! Is there some problem with access of arguments? For example I could get the length of the 2nd ($1) argument of another parent alias -- the first?

The problem is not reproduced when I ask for $1, then I get content of second argument of current alias, which is good.

But I am afraid padding/truncating is broken (when I set msgnick = "$[10]1>" I ever get exactly 2 spaces between the name and the >, no matter how long it is).

I first wondered if it wasn't related to color changes, because the sequence of commands you propose in documentation/tricks to achieve the goal works, but when I noticed that $@ gives awfully wrong and/or unexpected results I think the error is deeper.

Thanks a lot for this great powerful good-looking text iRC client (et vive irssi + screen !).

FrnchFrgg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions