Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] Line number in prompt after `zle reset-prompt'
- X-seq: zsh-workers 37036
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] Line number in prompt after `zle reset-prompt'
- Date: Sat, 31 Oct 2015 13:23:31 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=KVlQENMw4drXoTrgdkuLfqW7irzQU5UPKeC2+8IEses=; b=XFcMGuK7TKfefuDqV87jnGWEJErFfnIXg7HNVYUw/SiA+LB5xJ7sW6JV9jVFCKd39v q6VU+XC1/xsMtm8vpDHWWCcKk927k/72A2vZXdhEo1zQr89rAk15eYmKCQszbnDnKMIW hSIzzJmws5ZGeepZX/UhvdwBt5+TOQTkQ+WTUEHD4pH7rxcElpLCQbgAPOfdQgo4Dvnj gksL5Eqgw0QEHYPKtotcMhPZ4WbHFLSKl3VAEehn3NRhugBL6xE6B/19tDSKHK6B7JlQ Ky4YXw0+w4uTSP7RPNNUzDfb3/EuQB8093LCw41v183qwPxGQyKbpJpLOvblFVnT0LHq RPQA==
- In-reply-to: <CAKc7PVDMKDHq+0nHrUa=VnTAVT6_iLLuLY4TM-fbV4HmROqd3g@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author