I use iTerm2 (Build 1.0.0.20130319) and Vim (bin of MacVim Snapshot 66) on top of OS X 10.7.5 as my CLI editing team.
In iTerm2 I defined to use a non-blinking vertical bar as a cursor shape. In Vim I defined
" Enter insert mode (Cursor shape: vertical bar)
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
" Leave insert mode (Cursor shape: block)
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
to be able to distinct between insert and normal mode. Basically this works fine. The problem arises when I leave Vim and return to the CLI. What happens is that the cursor does not return in its initial shape (vertical bar). Instead it decides to stay in a block shape.
Could I reset the cursor to it's initial shape or force it to return to be a vertical bar? I Could imagine to trigger an event on e.g. "VimLeave". But I don't know what I could pass as an escape sequence.