Improvements:
- check if update_terminal_cwd is available instead of relying on the
kernel version
- test the feature once at init time instead of at prompt time
Note that zsh is not yet supported for that feature unless the
update_terminal_cwd has been imported in your environment.
I think it would be possible to support it, but I don't have access to
MacOS X machines, so... patches are welcome!
In some cases (multi user enabled in screen for example), the count of
detached screen sessions was incorrect. The command to locate these has
been improved using a more tolerant regex, which also makes sure the
"Detached" word appears inside a parenthesis (so it's not an attached
screen to a machine called Detach for example).
unset local variables that interfere with autonamedirs in oh-my-zsh
1) unset local variable p before use in zsh pwd truncation
2) prefix LP_OLD_PWD with "LP:" to avoid autonaming
_lp_upwards_find was using a single-quoted $@, not double-quoted, so
find was actually looking for files called '$@'.
In addition, once _lp_upwards_find finds the file it's looking for, it
breaks out so it doesn't need to always traverse to root. I doubt
this actually saves much in practice, but it might as well be there.
Mercurial and Bazaar are written in Python, which, on my system,
causes a noticeable hitch in the prompt generation when changing
directories. I have added code that, before invoking the 'hg' or
'bzr' executables, first tests if we could possibly be in a bazaar or
hg repository checkout by traversing the directory structure upwards
to the root, looking for an '.hg' or '.bzr' folder.
At least for me, this makes the prompt instantaneous. There may be
more elegant solutions to this problem, but this one works.
Revert "Added null check for count in _lp_temp_sensors() to stop division by zero errors in case count is still zero."
Closes#214.
Thanks @jaesivsm
This reverts commit 9d96a82c80.
Conflicts:
liquidprompt
FreeBSD: fixed _lp_cpu_load
Darwin: optimized _lp_cpu_load
Note that this change may break syntax coloring in Vim if Vim is not
configured to read the file as 'bash'. Workaround: create a symbolic
link with a '.bash' extension and open that file.