If some long shell code is run in the background it may be shown as more then
one job:
bash-4.2$ {
> echo abc | while read line ; do
> sleep 1s
> sleep 1s
> done
> } &
[1] 9401
bash-4.2$ jobs
[1]+ Running { echo abc | while read line; do
sleep 1s; sleep 1s;
done; } &
`jobs -p` print exactly one job in this case.
Replaces #596. Differences:
- Tests and metavar.
- Uses “jobnum” name in place of “jobs”.
- Does not use subshell for zsh. Also counts jobs correctly in zsh.
- Adds an option to force showing jobnum segment even if there are no jobs.
Some notes on the commit:
1. As external_ip and email_imap_alert segments seem to be removed corresponding
segment_data keys also were removed.
2. Various files that import vim module now have the usual workaround that sets
vim local to dummy object on error.
3. Syntastic check was failing because it did not specify which highlighting
groups it uses in documentation. I made it specify them and also moved format
strings to keywords. Same for some other plugin-local themes.
4. powerline-lint script got --debug argument. Pretty useless currently though:
it only makes it output traceback for ImportError when failing to import
module to stderr.
5. Moved themes/vim/plugin/*.json to themes/vim/plugin_*.json.
6. Fixed powerline-lint that ignored problems from values.
- _external_ip() isn't necessary with freegeoip.net as it does this for you when unspecified.
- region_name/country_name make Yahoo's weather API unhappy whereas region_code/country_code work for me (TX/US)
If you try to checkout the already current branch in git, git creates
HEAD.lock and renames it to HEAD. This causes the inode of HEAD to
change and so the inotify file watcher stops tracking HEAD.
The fix is to re-create the inotify watch when the file attributes
change. This is a bit of a performance penalty as most of the time the
attribute changes are simple last modified time/size changes, but since
inotify provides no way to know specifically when the inode has changed,
this is the best we can do.