Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function vcs_info_wrapper() {
  2. vcs_info
  3. ... # parse $vcs_info_msg_0_ and return info on checkout
  4. }
  5.  
  6. timeout 0.5s vcs_info
  7. if [ $? -eq 124 ]; then
  8. echo "timed out"
  9. else
  10. ... # parse $vcs_info_msg_0_ and return info on checkout
  11. fi
  12.  
  13. autoload -Uz vcs_info
  14. vcs_info
  15.  
  16. timeout 0.5s source $HOME/scripts/vcs_info.sh
  17.  
  18. timeout 0.5s zsh -c 'source $HOME/scripts/vcs_info.sh'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement