Make the git-info prompt auto-deactivation optional #307

Closed
ColinHebert opened this Issue Oct 4, 2012 · 7 comments

Comments

Projects
None yet
3 participants
Contributor

ColinHebert commented Oct 4, 2012

While being useful for some cases, the automatic deactivation of git-info when the user used ctrl+C can also be a real annoyance, especially when you send SIGINT relatively often.

I think the line add-zsh-trap INT _git-info-abort should be optional and define by a zstyle for the git module.

What's your thought on that?

Owner

sorin-ionescu commented Oct 4, 2012

I think not since that functionality was added for very large repositories, where git-status can take 30 seconds to a minute. If you press ^C often for no good reason, perhaps you should change your behaviour.

Contributor

ColinHebert commented Oct 4, 2012

I do that because it takes a long time (due to a huge repository), but that doesn't mean I want my prompt to be disabled all the time.

Additional note, this trap doesn't seem to work all the time. Most of the time it acts like I would like it to by just sending sigint to the git status command (called inside the prompt), making the rest of the prompt available (and displayed correctly).
And from time to time it works as it should (which isn't the behaviour I like) by just disabling git-info entirely.

Owner

sorin-ionescu commented Oct 4, 2012

It depends on the Zsh version. Some Zsh versions are buggy and SIGINT is not caught.

Contributor

ColinHebert commented Oct 4, 2012

I have the latest version available (5.0.0). But it doesn't change the fact that having the prompt disabled automatically isn't necessarily what the user want.

Owner

sorin-ionescu commented Oct 4, 2012

If I were to add a zstyle, it would be enabled by default in zpreztorc, at least until we get a faster git-info.

Contributor

ColinHebert commented Oct 4, 2012

I don't mind (and it would be the best thing to do as it behaved this way so far) as long as it's possible to change that setting easily.

orenhe commented Feb 18, 2013

I've added a related pull request at #394

@gmaghera gmaghera added a commit to gmaghera/prezto that referenced this issue May 19, 2013

@gmaghera gmaghera Merge remote-tracking branch 'upstream/master'
* upstream/master:
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix #221] Add a simple git-info
  [#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  Refactor Emacs module
  Load completion for Carton
ac72c9a

@admk admk added a commit to admk/prezto that referenced this issue May 20, 2013

@admk admk Merge branch 'master' of https://github.com/sorin-ionescu/prezto into…
… HEAD

* 'master' of https://github.com/sorin-ionescu/prezto: (35 commits)
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix #221] Add a simple git-info
  [#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  Refactor Emacs module
  Load completion for Carton
  Correct syntax error in variable assignment
  Ensure that the tmux server is started
  [Fix #426] Correct syntax error in variable assignment
  [Fix #419] Rewrite module gpg-agent; rename it to gpg
  [Fix #52] Add zstyles to configure history-substring-search
  ...
a19cdee

@trongrg trongrg added a commit to trongrg/prezto that referenced this issue May 27, 2013

@trongrg trongrg Merge remote-tracking branch 'upstream/master'
* upstream/master: (39 commits)
  [Fix #436] Remove Bombich rsync references
  Add the RubyGems bin directory to PATH on other Unix systems
  Do not substitute /tmp since $TMPDIR is always set
  [Fix #437] Always set $TMPDIR
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix #221] Add a simple git-info
  [#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  Refactor Emacs module
  Load completion for Carton
  Correct syntax error in variable assignment
  ...
8e4a2f3

@adamrights adamrights added a commit to adamrights/prezto that referenced this issue Jun 7, 2013

@adamrights adamrights Merge branch 'master' of https://github.com/sorin-ionescu/prezto
* 'master' of https://github.com/sorin-ionescu/prezto: (42 commits)
  Rename archive module functions
  [Fix #436] Update link to Bombich rsync
  Revert "[Fix #436] Remove Bombich rsync references"
  [Fix #436] Remove Bombich rsync references
  Add the RubyGems bin directory to PATH on other Unix systems
  Do not substitute /tmp since $TMPDIR is always set
  [Fix #437] Always set $TMPDIR
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix #221] Add a simple git-info
  [#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  ...

Conflicts:
	runcoms/zpreztorc
c5bd540

@douglasdrumond douglasdrumond added a commit to douglasdrumond/prezto that referenced this issue Jun 24, 2013

@douglasdrumond douglasdrumond Merge branch 'master' of github.com:eee19/prezto
* 'master' of github.com:eee19/prezto: (28 commits)
  Rename archive module functions
  [Fix #436] Update link to Bombich rsync
  Revert "[Fix #436] Remove Bombich rsync references"
  [Fix #436] Remove Bombich rsync references
  Add the RubyGems bin directory to PATH on other Unix systems
  Do not substitute /tmp since $TMPDIR is always set
  [Fix #437] Always set $TMPDIR
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix #221] Add a simple git-info
  [#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  ...
7fe0563

@jeffknupp jeffknupp pushed a commit to jeffknupp/prezto that referenced this issue Oct 15, 2013

@sorin-ionescu sorin-ionescu + Jeff Knupp [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
4b16b52

@linuslundahl linuslundahl added a commit to linuslundahl/prezto that referenced this issue Oct 17, 2013

@sorin-ionescu @linuslundahl sorin-ionescu + linuslundahl [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
daf90f4

@zeroasterisk zeroasterisk added a commit to zeroasterisk/prezto that referenced this issue Oct 22, 2013

@sorin-ionescu @zeroasterisk sorin-ionescu + zeroasterisk [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
3688bdd

@lildude lildude pushed a commit to lildude/prezto that referenced this issue Jan 12, 2014

@sorin-ionescu sorin-ionescu [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
4ce74a9

@lackac lackac added a commit to lackac/prezto that referenced this issue Jan 19, 2014

@sorin-ionescu @lackac sorin-ionescu + lackac [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
f5d22f2

@matthoffman matthoffman added a commit to matthoffman/oh-my-zsh that referenced this issue Sep 18, 2014

@sorin-ionescu @matthoffman sorin-ionescu + matthoffman [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
a7b9fb2

@fanf fanf added a commit to fanf/prezto that referenced this issue Nov 12, 2015

@sorin-ionescu @fanf sorin-ionescu + fanf [Fix #307] Do not auto-off git-info
Instead of turning off git-info when CTRL+C is caught, show instructions
on how to turn it off manually.
398bce9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment