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

Re: Some questions (menu completion and two-line prompts)



On Feb 18,  1:36am, Adrian wrote:
}
} - I'm using AUTO_MENU so I first get a list of completion candidates
}   and then menu selection by pressing tab once again. That's fine, but
}   in cases where the candidate list is very long (i.e. doesn't fit on
}   the screen), I'd rather get menu selection mode immediately instead

Try something like

    zstyle ':completion:*' menu yes=long select=long

} - I'm using the adam2 prompt style. When resizing my terminal window
}   (making it smaller), the pretty horizontal line in the first line of
}   the prompt is not redrawn, keeping the old width.

There are two factors here.  (1) each prompt style is responsible for
creating its own WINCH trap (the [win]dow [ch]ange signal) and (2) not
all terminal emulators send the signal.  adam2 doesn't define the trap.

The following probably does more work than necessary, but adam2 isn't
factored well for performing just the width computations.

    TRAPWINCH() {
       zle && echo '' && prompt_adam2_precmd && zle reset-prompt
    }

(Without the "echo ''" the prompt climbs the window until it's the only
thing visible.  With it, one blank line is added at the bottom.)



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