* adam2 prompt truncating command output @ 2017-10-30 6:27 ` xeyrion 2017-10-30 9:36 ` Peter Stephenson 0 siblings, 1 reply; 9+ messages in thread From: xeyrion @ 2017-10-30 6:27 UTC (permalink / raw) To: zsh-users [-- Attachment #1: Type: text/plain, Size: 591 bytes --] Hello, It looks like using adam2 prompt truncates command output if the output does not end with a newline: ------------------------- `--> zsh --no-globalrcs --no-rcs dt% echo -n asd asd% dt% autoload -Uz colors && colors dt% autoload -Uz promptinit && promptinit dt% prompt adam2 ------------------------- `--> echo -n asd ------------------------- `--> I assume this is a bug with the prompt? Could anyone recommend a work around / fix? The prompt works and looks great otherwise. Zsh version is 5.4.2. Thanks in advance. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 6:27 ` adam2 prompt truncating command output xeyrion @ 2017-10-30 9:36 ` Peter Stephenson 2017-10-30 16:41 ` Bart Schaefer 0 siblings, 1 reply; 9+ messages in thread From: Peter Stephenson @ 2017-10-30 9:36 UTC (permalink / raw) To: xeyrion, zsh-users On Mon, 30 Oct 2017 06:27:13 +0000 xeyrion@gmail.com wrote: > It looks like using adam2 prompt truncates command output if the output > does not end with a newline: That's standard zsh behaviour: it's that way because the line editor works best when it knows what position it's at in a line, so it ensures the prompt starts at the left. I'm not familiar with this prompt, but if it prints anything at the right hand end of the screen, you're out of luck --- if there's output without a newline it'll just wrap round and mess up the display. You'll have to pick which aspect you dislike least. Otherwise, you might be able to get away without the standard behaviour, in which case try the option: setopt nopromptcr pws ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 9:36 ` Peter Stephenson @ 2017-10-30 16:41 ` Bart Schaefer 2017-10-30 16:57 ` xeyrion 0 siblings, 1 reply; 9+ messages in thread From: Bart Schaefer @ 2017-10-30 16:41 UTC (permalink / raw) To: Peter Stephenson; +Cc: xeyrion, Zsh Users On Mon, Oct 30, 2017 at 2:36 AM, Peter Stephenson <p.stephenson@samsung.com> wrote: > On Mon, 30 Oct 2017 06:27:13 +0000 > xeyrion@gmail.com wrote: >> It looks like using adam2 prompt truncates command output if the output >> does not end with a newline: > > That's standard zsh behaviour: it's that way because the line editor > works best when it knows what position it's at in a line, so it ensures > the prompt starts at the left. The adam2 theme (and possibly some others) should probably be doing "setopt prompt_sp". ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 16:41 ` Bart Schaefer @ 2017-10-30 16:57 ` xeyrion 2017-10-30 20:25 ` Eric Cook 2017-10-30 20:33 ` Bart Schaefer 0 siblings, 2 replies; 9+ messages in thread From: xeyrion @ 2017-10-30 16:57 UTC (permalink / raw) To: Bart Schaefer; +Cc: Peter Stephenson, Zsh Users [-- Attachment #1: Type: text/plain, Size: 967 bytes --] Yep, "setopt prompt_sp" fixed it. Thanks Bart! It does not appear to be causing any side effects either. Interestingly, docs claim that this option is on by default ( http://zsh.sourceforge.net/Doc/Release/Options.html#index-PROMPTSP <http://zsh.sourceforge.net/Doc/Release/Options.html#index-NOPROMPTSP>), but it was not for me. On Mon, Oct 30, 2017 at 10:41 AM Bart Schaefer <schaefer@brasslantern.com> wrote: > On Mon, Oct 30, 2017 at 2:36 AM, Peter Stephenson > <p.stephenson@samsung.com> wrote: > > On Mon, 30 Oct 2017 06:27:13 +0000 > > xeyrion@gmail.com wrote: > >> It looks like using adam2 prompt truncates command output if the output > >> does not end with a newline: > > > > That's standard zsh behaviour: it's that way because the line editor > > works best when it knows what position it's at in a line, so it ensures > > the prompt starts at the left. > > The adam2 theme (and possibly some others) should probably be doing > "setopt prompt_sp". > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 16:57 ` xeyrion @ 2017-10-30 20:25 ` Eric Cook 2017-10-31 16:40 ` xeyrion 2017-10-30 20:33 ` Bart Schaefer 1 sibling, 1 reply; 9+ messages in thread From: Eric Cook @ 2017-10-30 20:25 UTC (permalink / raw) To: zsh-users On 10/30/2017 12:57 PM, xeyrion@gmail.com wrote: > Interestingly, docs claim that this option is on by default ( > http://zsh.sourceforge.net/Doc/Release/Options.html#index-PROMPTSP > <http://zsh.sourceforge.net/Doc/Release/Options.html#index-NOPROMPTSP>), > but it was not for me. > Are you using some framework like oh-my-zsh that possibly disabled it? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 20:25 ` Eric Cook @ 2017-10-31 16:40 ` xeyrion 0 siblings, 0 replies; 9+ messages in thread From: xeyrion @ 2017-10-31 16:40 UTC (permalink / raw) Cc: zsh-users [-- Attachment #1: Type: text/plain, Size: 542 bytes --] On Mon, Oct 30, 2017 at 5:10 PM Eric Cook <llua@gmx.com> wrote: > On 10/30/2017 12:57 PM, xeyrion@gmail.com wrote: > > Interestingly, docs claim that this option is on by default ( > > http://zsh.sourceforge.net/Doc/Release/Options.html#index-PROMPTSP > > <http://zsh.sourceforge.net/Doc/Release/Options.html#index-NOPROMPTSP>), > > but it was not for me. > > > Are you using some framework like oh-my-zsh that possibly disabled it? > Nope. I verified that adam2 prompt does indeed disable it. The option is on before switching the prompt. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 16:57 ` xeyrion 2017-10-30 20:25 ` Eric Cook @ 2017-10-30 20:33 ` Bart Schaefer 2017-10-30 23:43 ` Oliver Kiddle 1 sibling, 1 reply; 9+ messages in thread From: Bart Schaefer @ 2017-10-30 20:33 UTC (permalink / raw) To: xeyrion; +Cc: Peter Stephenson, Zsh Users On Mon, Oct 30, 2017 at 9:57 AM, <xeyrion@gmail.com> wrote: > Yep, "setopt prompt_sp" fixed it. Thanks Bart! > > Interestingly, docs claim that this option is on by default [...], but it > was not for me. It would appear that "prompt adam2" actually goes so far as to turn prompt_sp *off* (and prompt_cr on). This might be a case of the theme having been developed before prompt_sp was introduced, and not correctly updated. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 20:33 ` Bart Schaefer @ 2017-10-30 23:43 ` Oliver Kiddle 2017-10-31 20:32 ` Bart Schaefer 0 siblings, 1 reply; 9+ messages in thread From: Oliver Kiddle @ 2017-10-30 23:43 UTC (permalink / raw) To: Zsh Users Bart wrote: > It would appear that "prompt adam2" actually goes so far as to turn > prompt_sp *off* > (and prompt_cr on). This might be a case of the theme having been developed > before prompt_sp was introduced, and not correctly updated. Should it really be any business of prompt themes to touch the prompt_cr and prompt_sp options at all? I'd have regarded them as a user-preference unrelated to the theme - unlike prompt_subst/bang/percent which affect whether the theme actually works or not. Oliver ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adam2 prompt truncating command output 2017-10-30 23:43 ` Oliver Kiddle @ 2017-10-31 20:32 ` Bart Schaefer 0 siblings, 0 replies; 9+ messages in thread From: Bart Schaefer @ 2017-10-31 20:32 UTC (permalink / raw) To: Oliver Kiddle; +Cc: Zsh Users On Mon, Oct 30, 2017 at 4:43 PM, Oliver Kiddle <okiddle@yahoo.co.uk> wrote: > > Should it really be any business of prompt themes to touch the prompt_cr > and prompt_sp options at all? The adam2 prompt and a few others have a two-line prompt where the top line occupies the entire width of the terminal. Without one of promptct or promptsp that line would always mess up the display. However, promptsp would probably be a better choice than promptcr -- if those prompt themes weren't older than the existence of promptsp. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-10-31 20:33 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20171030062906epcas2p30c9592dea463811869f232aea69d86fe@epcas2p3.samsung.com> 2017-10-30 6:27 ` adam2 prompt truncating command output xeyrion 2017-10-30 9:36 ` Peter Stephenson 2017-10-30 16:41 ` Bart Schaefer 2017-10-30 16:57 ` xeyrion 2017-10-30 20:25 ` Eric Cook 2017-10-31 16:40 ` xeyrion 2017-10-30 20:33 ` Bart Schaefer 2017-10-30 23:43 ` Oliver Kiddle 2017-10-31 20:32 ` Bart Schaefer
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).