spin

Synopsis

spin_msg msg [ style ] spin_msg_error [ msg ] spin_msg_success [ msg ] spin_msg_end spin_inactive spin msg [ style ]

Description

spin_msg prints the given message depending on the value of RAW. If RAW is non-zero, it simply prints the message without a terminating newline.If RAW is zero, it calls spin with its arguments in the background and stores its pid. In both cases the last message with which it was called is stored and the state of spin is made active.

spin_msg_error and spin_msg_success can be called subsequent to a call to spin_msg to notify error or success.**spin_msg_error** prints failed or msg specified.**spin_msg_success** prints done or msg. Both call spin_msg_end

A call to spin_msg_end is necessary after a call to spin_msg either directly or indirectly via spin_msg_error or spin_msg_success.It kills the background spin call , resets the pid variable and state variable.

spin_inactive returns nonzero if spin_msg was called but a subsequent call to spin_msg_end was still pending.

spin starts an infinite loop printing the given message with a spinner.The style argument tells it which style of spinner to use:

System Message: ERROR/3 (spin.rst, line 39)

Unexpected indentation.
1 bars 2 bubble 3 cross 4 arrows

The default spinner is ZP_SPIN_STYLE if set or 1.

All spin functions respect value of VERBOSE