If I have custom configs (like theme customizations) I have to stash my changes and get them back after the update.
By adding the --autostash on upgrade.sh, if I have any changes not commited they'll be reapplied after the upgrade, allowing me to have temporary customizations without any harm to the upgrade process.
Also add comments and unset leftover variables, and print only the
name of the theme loaded.
When looking for $ZSH_CUSTOM themes, the chosen algorithm is to add
the theme names to the pool disregarding the path, and then source
whatever theme is selected with the same logic as the init script,
which is to source first custom themes even if there is another
default theme of the same name.
Co-authored-by: Mihai Serban <mihai.serban@gmail.com>
The statements for selecting a random theme in oh-my-zsh.sh and the themes
plugin are duplicate. Most people eventually settle on a theme, making those
lines in oh-my-zsh.sh superfluous. To address those, it may makes sense to put
the random theme functionality into a theme of its own (since themes are just
zsh scripts.
On a system with multiple batteries (like thinkpads) report percentage
and time remaining only for the active battery (the one being
discharged).
Ideally we should report all batteries, but acpi only shows time remaining
for the active battery. Also callers of these functions expect a single
return value. This is still better than reporting 596% remaining (like it
did on my laptop).
For the reference, the output of acpi command with multiple batteries looks
like this:
Battery 0: Unknown, 5%
Battery 1: Discharging, 86%, 03:14:04 remaining
- marks printed an error when $MARKPATH didn't exist or didn't have any marks
in it.
- The CTRL+G key binding overwrote an argument when it couldn't match it to
an existing mark.
- Fixes `readlink -e` dependency which isn't supported in macOS
(fixes#3235).
- Uses native zsh wildcard expansion instead of calls to `ls`.
- Prepends commands with `command` and `builtin` to bypass aliases
and functions.
- Documents CTRL+G key binding to substitute mark name in the command
line with the mark path (https://github.com/ohmyzsh/ohmyzsh/pull/2045#issuecomment-22826540).