zsh-users
 help / color / Atom feed
* Call for good plugins list
@ 2017-10-01 16:23 Sebastian Gniazdowski
  2017-10-01 16:41 ` Ray Andrews
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Gniazdowski @ 2017-10-01 16:23 UTC (permalink / raw)
  To: Zsh Users

Hello,
I once tested 40 plugins, when I was creating Zplugin. There were gems, but several problems were noticable, e.g. low commit count.

I'm creating semi-graphical interface to Zplugin. It is called Crasis, written in pure Zshell. It has list of "gold" plugins built in. The list is shown in video below:

https://asciinema.org/a/140446

I want to extend the list. Can I ask of any proposals? Which plugin do you use for a couple of months without problems and which has nice features?

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Call for good plugins list
  2017-10-01 16:23 Call for good plugins list Sebastian Gniazdowski
@ 2017-10-01 16:41 ` Ray Andrews
  2017-10-01 18:54   ` Bart Schaefer
  0 siblings, 1 reply; 9+ messages in thread
From: Ray Andrews @ 2017-10-01 16:41 UTC (permalink / raw)
  To: zsh-users


> https://asciinema.org/a/140446

Maybe it's just me, but I find Sebastian's animations go so fast I have 
no idea what's going on.  Bound to be very cool stuff tho.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Call for good plugins list
  2017-10-01 16:41 ` Ray Andrews
@ 2017-10-01 18:54   ` Bart Schaefer
  2017-10-01 19:29     ` Daniel Shahaf
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Schaefer @ 2017-10-01 18:54 UTC (permalink / raw)
  To: Ray Andrews, zsh-users

On Oct 1,  9:41am, Ray Andrews wrote:
}
} > https://asciinema.org/a/140446
} 
} Maybe it's just me, but I find Sebastian's animations go so fast I have 
} no idea what's going on.

I think think this is a result of asciinema compressing out any "frames"
where the screen doesn't change.  I thought at one point I'd found a way
to make it slow down, but I can't find that control now.

(Incidentally I'm not going to be answering the original question because
I don't use any plugins .. unless VCS_info counts, but I don't use that in
the recommended way either.)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Call for good plugins list
  2017-10-01 18:54   ` Bart Schaefer
@ 2017-10-01 19:29     ` Daniel Shahaf
  2017-10-01 21:50       ` VCS info (Re: Call for good plugins list) Bart Schaefer
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Shahaf @ 2017-10-01 19:29 UTC (permalink / raw)
  To: zsh-users

Bart Schaefer wrote on Sun, 01 Oct 2017 11:54 -0700:
> (Incidentally I'm not going to be answering the original question because
> I don't use any plugins .. unless VCS_info counts, but I don't use that in
> the recommended way either.)

I'm curious as to how you do use vcs_info.

(My use of it is standard, modulo that I use 'print -P' from precmd()
rather than promptsubst, and I have a few hooks, e.g., one that during
an rebase with a conflict, sets a variable to the hash of the commit
being re-applied.)

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* VCS info (Re: Call for good plugins list)
  2017-10-01 19:29     ` Daniel Shahaf
@ 2017-10-01 21:50       ` Bart Schaefer
  2017-10-01 22:16         ` Daniel Shahaf
  2020-02-11  9:38         ` What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list)) Lawrence Velázquez
  0 siblings, 2 replies; 9+ messages in thread
From: Bart Schaefer @ 2017-10-01 21:50 UTC (permalink / raw)
  To: zsh-users

On Oct 1,  7:29pm, Daniel Shahaf wrote:
}
} I'm curious as to how you do use vcs_info.

The main thing is that I despise prompt_subst, so:

autoload -Uz add-zsh-hook
autoload -Uz vcs_info

vcs-info-v() { vcs_info; RPS1="$vcs_info_msg_0_" }
add-zsh-hook precmd vcs-info-v

zstyle ':vcs_info:*' actionformats \
   '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats \
   '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '

This is in combination with transient_rprompt so the VCS stuff vanishes
while a command is running.

I did borrow somebody's (yours?) +vi-git-post-backend-updown hook, but
had to hack it because some of my remote terminals don't do UTF-8.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: VCS info (Re: Call for good plugins list)
  2017-10-01 21:50       ` VCS info (Re: Call for good plugins list) Bart Schaefer
@ 2017-10-01 22:16         ` Daniel Shahaf
  2020-02-11  9:38         ` What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list)) Lawrence Velázquez
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Shahaf @ 2017-10-01 22:16 UTC (permalink / raw)
  To: zsh-users

Bart Schaefer wrote on Sun, 01 Oct 2017 14:50 -0700:
> autoload -Uz add-zsh-hook
> autoload -Uz vcs_info
> 
> vcs-info-v() { vcs_info; RPS1="$vcs_info_msg_0_" }
> add-zsh-hook precmd vcs-info-v

I don't use promptsubst either:

_precmd_vcs_info () {
	vcs_info
	[[ -n ${vcs_info_msg_0_} ]] && {
		print
		print -Plr -- ${vcs_info_msg_0_} ${vcs_info_msg_1_}
	}
}

> I did borrow somebody's (yours?) +vi-git-post-backend-updown hook, but

I posted it once, but it had been added to vcs_info-examples before then.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list))
  2017-10-01 21:50       ` VCS info (Re: Call for good plugins list) Bart Schaefer
  2017-10-01 22:16         ` Daniel Shahaf
@ 2020-02-11  9:38         ` Lawrence Velázquez
  2020-02-12  5:23           ` Bart Schaefer
  1 sibling, 1 reply; 9+ messages in thread
From: Lawrence Velázquez @ 2020-02-11  9:38 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

Hi,

Sorry for dredging this up, but it caught my eye while I was working on
my mailing list backlog.

> On Oct 1, 2017, at 5:50 PM, Bart Schaefer <schaefer@brasslantern.com>
> wrote:
> 
> The main thing is that I despise prompt_subst

Why is that? I'm curious whether it has some drawbacks that I should be
aware of.

vq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list))
  2020-02-11  9:38         ` What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list)) Lawrence Velázquez
@ 2020-02-12  5:23           ` Bart Schaefer
  2020-02-12  7:17             ` Mikael Magnusson
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Schaefer @ 2020-02-12  5:23 UTC (permalink / raw)
  To: Lawrence Velázquez; +Cc: Zsh Users

On Tue, Feb 11, 2020 at 1:38 AM Lawrence Velázquez <vq@larryv.me> wrote:
>
> > On Oct 1, 2017, at 5:50 PM, Bart Schaefer <schaefer@brasslantern.com>
> > wrote:
> >
> > The main thing is that I despise prompt_subst
>
> Why is that?

Mostly it's a matter of taste.  It introduces yet another set of
tokens that you have to escape to use literally in prompts, and I
don't think the prompt is an appropriate place to be running command
substitutions.  It means even more possible collisions on variable
names with unintended side-effects.   Obviously these are things that
can be avoided; I'd just rather not have to think about them.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list))
  2020-02-12  5:23           ` Bart Schaefer
@ 2020-02-12  7:17             ` Mikael Magnusson
  0 siblings, 0 replies; 9+ messages in thread
From: Mikael Magnusson @ 2020-02-12  7:17 UTC (permalink / raw)
  To: Zsh Users

On 2/12/20, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Tue, Feb 11, 2020 at 1:38 AM Lawrence Velázquez <vq@larryv.me> wrote:
>>
>> > On Oct 1, 2017, at 5:50 PM, Bart Schaefer <schaefer@brasslantern.com>
>> > wrote:
>> >
>> > The main thing is that I despise prompt_subst
>>
>> Why is that?
>
> Mostly it's a matter of taste.  It introduces yet another set of
> tokens that you have to escape to use literally in prompts, and I
> don't think the prompt is an appropriate place to be running command
> substitutions.  It means even more possible collisions on variable
> names with unintended side-effects.   Obviously these are things that
> can be avoided; I'd just rather not have to think about them.

One particular cargo culted piece of setup is the following combo,

setopt prompt_subst
preexec() {
  print -P "$escape_to_set_terminal_title $1 $end_terminal_title"
}

which will result in the following command having funny results,
echo '$(killall -9 zsh)'

(the above code is wrong even without prompt_subst but the
consequences are quite a bit worse with it). The easy fix with
prompt_subst enabled is to use \$1 instead which should be more or
less fine as long as you haven't literally typed in the
$end_terminal_title code.

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 16:23 Call for good plugins list Sebastian Gniazdowski
2017-10-01 16:41 ` Ray Andrews
2017-10-01 18:54   ` Bart Schaefer
2017-10-01 19:29     ` Daniel Shahaf
2017-10-01 21:50       ` VCS info (Re: Call for good plugins list) Bart Schaefer
2017-10-01 22:16         ` Daniel Shahaf
2020-02-11  9:38         ` What's wrong with PROMPT_SUBST? (Was: VCS info (Re: Call for good plugins list)) Lawrence Velázquez
2020-02-12  5:23           ` Bart Schaefer
2020-02-12  7:17             ` Mikael Magnusson

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git