tamcore / autoupdate-oh-my-zsh-plugins Goto Github PK
View Code? Open in Web Editor NEWPlugin for oh-my-zsh to automatically update custom-plugins
License: MIT License
Plugin for oh-my-zsh to automatically update custom-plugins
License: MIT License
Everything works great for auto-updating my custom plugins, but now to update oh-my-zsh, I need to run upgrade_oh_my_zsh
Could you replace find "${ZSH_CUSTOM}" -type d -name .git | while read d
with find -L "${ZSH_CUSTOM}" -type d -name .git | while read d
?
I have all my plugins and themes symlinked to a folder that's synced (via Syncthing) to my other computers.
~/.oh-my-zsh/custom/plugins> ll
total 0
lrwxr-xr-x 1 user user 45 Jul 8 18:11 autoupdate -> ../../../.backup/oh-my-zsh/plugins/autoupdate
drwx------ 3 user user 96 Jul 8 16:49 example
lrwxr-xr-x 1 user user 54 Jul 8 18:11 zsh-autosuggestions -> ../../../.backup/oh-my-zsh/plugins/zsh-autosuggestions
lrwxr-xr-x 1 user user 50 Jul 8 18:11 zsh-completions -> ../../../.backup/oh-my-zsh/plugins/zsh-completions
lrwxr-xr-x 1 user user 58 Jul 8 18:11 zsh-syntax-highlighting -> ../../../.backup/oh-my-zsh/plugins/zsh-syntax-highlighting
Without -L
, upgrade_oh_my_zsh_custom
cannot find any of the git repositories.
I tested the updated find command with symlinked plugins and plugins in directories in the same plugins directory. It could find all repositories. Therefore, adding -L
should be no issue for users without symlinks.
If you want to make it absolutely save, you could introduce a variable which overrides the behavior.
Thanks in advance.
Since this works with oh-my-zsh and not other ZSH frameworks like zgen or antigen, I suggest you rename it to autoupdate-oh-my-zsh-plugins.
I'd like to add this to awesome-zsh-plugins, but I'd prefer to do that after you rename it if you decide to do that.
Thanks
I'd like to add this to awesome-zsh-plugins, but it doesn't have a license file.
Please add a license file - if you don't have one in mind, I recommend using choosealicense.com to help choose an appropriate one.
Thanks!
Some plugin repositories have renamed their master
branch to main
.
This autoupdate plugin should work on both configuration.
Thanks for this little but useful plugin ;)
It seems that the Oh My Zsh community decided to introduce a new omz
command to centralize OMZ-related actions and moved the update mechanism to it: ohmyzsh/ohmyzsh@3935ccc. So now, when using this plugin's upgrade_ohl_my_zsh
command which calls the old upgrade_oh_my_zsh
function, it displays this:
Maybe consider replacing the call to the deprecated command with the new omz update
?
Cheers.
Hello,
Is there a way to configure the plugin to respond "Yes" automatically to the prompt "[oh-my-zsh] Would you like to update? [Y/n]"
Regards
J.
When I run omz update
it does not update custom plugins folder as stated in the readme file
Instead I get following output
Updating Oh My Zsh
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: @ohmyzsh
Want to get involved in the community? Join our Discord: Discord server
Get your Oh My Zsh swag at: Planet Argon Shop
Only when I run upgrade_oh_my_zsh_all
I get the expected output
Updating Oh My Zsh
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: @ohmyzsh
Want to get involved in the community? Join our Discord: Discord server
Get your Oh My Zsh swag at: Planet Argon Shop
Upgrading Custom Plugins
The autoupdate plugin was already at the latest version.
It seems to me that the core function performing the upgrade itself goes
correctly in all git repositories of the $ZSH_CUSTOM
, but does not change
back to the original working directory as of when calling the script.
To test this, I simply commented out the last line of the main script file, the
one unsetting local functions, and then directly:
$ source ./autoupdate.plugin.zsh
$ _upgrade_custom
<...>
This should call the upgrade function just like it does normally, but when
it is done, the shell is placed in the last updated plugin or theme, which
is undesirable in my opinion.
I think simply saving the $PWD
before cd
ing to upgrade plugins and
changing back to it after that is done should do the trick. Would a PR be
good for this?
Cheers.
While reading plugin code I noticed that it supports some coloring.
But this doesn't work for me. The -t 1
test returns false
. Don't know why...
https://github.com/TamCore/autoupdate-oh-my-zsh-plugins/blob/708bd95debaf6b12ead3af0cfd41f1a1d872556c/autoupdate.plugin.zsh#L8
$ lsb_release -d
Description: Ubuntu 20.04.1 LTS
$ zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
I sometimes run upgrade_oh_my_zsh_all
to keep Oh My Zsh and my plugins updated. I noticed that whenever there is an update for Oh My Zsh, the upgrade_oh_my_zsh_all
command updates only Oh My Zsh, when it was actually supposed to update the custom plugins as well. To get the plugins updated properly, I have to run upgrade_oh_my_zsh_all again.
omz version: master (0a9a80a) -> https://github.com/ohmyzsh/ohmyzsh/tree/0a9a80a524ca277ed6573e233204806f800a9292
autoupdate plugin version: 677f9f6
The git included with RHEL7 is git version 1.8.3.1 and does not support the autostash option.
Is there a way to test for the option?
Hey man, could you help me?
I've cloned like you've said in the readme:
❯ git clone https://github.com/TamCore/autoupdate-oh-my-zsh-plugins $ZSH_CUSTOM/plugins/autoupdate
My dir is now:
❯ ls $ZSH_CUSTOM/plugins/
autoupdate zsh-autosuggestions zsh-syntax-highlighting
example zsh-history-substring-search
In my .zshrc
I have:
plugins=(autoupdate pyenv zsh-autosuggestions history-substring-search z zsh-syntax-highlighting)
I've started another shell, but when I run upgrade it doesn't kick in:
❯ upgrade_oh_my_zsh
Updating Oh My Zsh
From https://github.com/ohmyzsh/ohmyzsh
* branch master -> FETCH_HEAD
Current branch master is up to date.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh
❯
I'm on macOS:
❯ zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)
Can you imagine what is going on?
The following lines seem to be redundant as there are no python code in the repository.
autoupdate-oh-my-zsh-plugins/.github/workflows/ci.yaml
Lines 15 to 16 in 8c4f63d
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.