From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18050 invoked by alias); 31 Oct 2015 20:23:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37036 Received: (qmail 15100 invoked from network); 31 Oct 2015 20:23:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=KVlQENMw4drXoTrgdkuLfqW7irzQU5UPKeC2+8IEses=; b=HgAJ5RiCyVru3025q/1xZwhrFuLvEfqn3KBXhjj9tnSHp21NE+NWyhDqiEey8YZ8Xo CE3dAwsjmnWPQAvO/ClY8wRFz051p6S3wKPKLKsNVz1F6WkKVho08Kd6CMHgrsWLeh/J kyXeiqPzUYD4+2PT9Srel0oTVOjpzXijDuGMySPc8kVX3Zk3Dmu+wsTHvDp/bwEnB6xb LkW9feUUHi0XGwFeqRJ57q7+DSDJMHZDT5/8jJGEGjdykTtbXzVkaqLVxtqYQMCGkhyl V1smrMdJBI0rSlY35uSag+fED9/XUM5SvjWDUAQAJvysDWL0zmwwHbgupnzRmtDjS1d4 c9rQ== X-Gm-Message-State: ALoCoQmPiv5Q5Cuxf7nrm9Vjlgog2rdSVNllq5kym4ZYZvmSa6rQACD6LYwSxfJ8yf71OJD+3c/6 X-Received: by 10.60.82.36 with SMTP id f4mr9623096oey.55.1446323014179; Sat, 31 Oct 2015 13:23:34 -0700 (PDT) From: Bart Schaefer Message-Id: <151031132331.ZM21501@torch.brasslantern.com> Date: Sat, 31 Oct 2015 13:23:31 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "[BUG] Line number in prompt after `zle reset-prompt'" (Oct 31, 7:42pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: [BUG] Line number in prompt after `zle reset-prompt' MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.