From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] Line number in prompt after `zle reset-prompt'
Date: Sat, 31 Oct 2015 13:23:31 -0700 [thread overview]
Message-ID: <151031132331.ZM21501@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVDMKDHq+0nHrUa=VnTAVT6_iLLuLY4TM-fbV4HmROqd3g@mail.gmail.com>
On Oct 31, 7:42pm, Sebastian Gniazdowski wrote:
}
} PROMPT="%i # "
} a() { zle reset-prompt }
} zle -N a
} bindkey "^E" a
}
} and press Ctrl-E. Line number will change
Not sure this is a bug:
%N
The name of the script, sourced file, or shell function that zsh is
currently executing, whichever was started most recently.
%i
The line number currently being executed in the script, sourced
file, or shell function given by %N.
If you use:
PROMPT="%N %i # "
and then press ^E, you will see
a 0 #
which is correct, the line number in the function "a" is 0.
next prev parent reply other threads:[~2015-10-31 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 18:42 Sebastian Gniazdowski
2015-10-31 20:23 ` Bart Schaefer [this message]
2015-11-01 15:18 ` Sebastian Gniazdowski
2015-11-01 18:59 ` 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=151031132331.ZM21501@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--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).