zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: PATCH: evaluation depth in prompts
Date: Wed, 03 Sep 2014 01:53:04 +0200	[thread overview]
Message-ID: <17098.1409701984@thecus.kiddle.eu> (raw)
In-Reply-To: <140901140202.ZM14612@torch.brasslantern.com>

Bart wrote:

> Here's a related idea/suggestion which adds indentation to the output
> of _complete_debug.  There's no convenient way to produce ${(%):-%e}

Seems a useful idea and at worst, horizontally scrolling get used when
viewing the output.

> If completion goes more than 20 function calls deep there's probably
> something wrong anyway.

Or if it does, then it doesn't especially matter that indentation simply
stops at this limit: it's arguably a feature rather than a limitation.

> I couldn't decide whether to put the indentation after the leading "+"
> or before it.  This has it before.

When viewing _complete_debug output, I nearly always use the less
feature to filter lines using &pattern, often using a pattern such as
\+_expand to filter by a particular function. With that in mind,
indentation before is more helpful.

> +  local -a debug_indent; debug_indent=( '%'{3..20}'(e. .)' )
> +  local PROMTP4 PS4="${(j::)debug_indent}+%N:%i> "

Note the typo for PROMPT4.

Oliver


  parent reply	other threads:[~2014-09-02 23:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 16:40 Function for examining structure of calls in debug output Peter Stephenson
2014-08-26 17:10 ` PATCH: evaluation depth in prompts Peter Stephenson
2014-08-29 16:16   ` Peter Stephenson
2014-09-01 21:02     ` Bart Schaefer
2014-09-02  8:38       ` Peter Stephenson
2014-09-02 23:53       ` Oliver Kiddle [this message]
2014-09-03  1:38         ` Bart Schaefer
2014-08-30 20:35   ` Bart Schaefer
2014-08-30 19:38 ` Function for examining structure of calls in debug output Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17098.1409701984@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).