♻️ Migration
Oh-My-Zsh
Syntaxe abrégée OMZ
zi snippet <URL> # Raw Syntax with URLzi snippet OMZ::<PATH> # Shorthand OMZ/ (http://github.com/ohmyzsh/ohmyzsh/raw/master/)zi snippet OMZL::<PATH> # Shorthand OMZ/lib/ (http://github.com/ohmyzsh/ohmyzsh/raw/master/lib)zi snippet OMZT::<PATH> # Shorthand OMZ/themes/ (http://github.com/ohmyzsh/ohmyzsh/raw/master/themes)zi snippet OMZP::<PATH> # Shorthand OMZ/plugins/ (http://github.com/ohmyzsh/ohmyzsh/raw/master/plugins)Bibliothèque OMZ
Importing the clipboard and termsupport from the OMZ library sample:
Syntaxe brute:
zi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zshzi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zshSyntaxe abrégée OMZ:
zi snippet OMZ::lib/clipboard.zshzi snippet OMZ::lib/termsupport.zshSyntaxe abrégée OMZL:
zi snippet OMZL::clipboard.zshzi snippet OMZL::termsupport.zshPlug-ins OMZ
- plugins=(- git- dotenv- rake- rbenv- ruby-)+ zi snippet OMZP::git+ zi snippet OMZP::dotenv+ zi snippet OMZP::rake+ zi snippet OMZP::rbenv+ zi snippet OMZP::rubyExemple de chargement turbo conditionnel plus avancé:
zi is-snippet wait lucid for \ atload"unalias grv g" \ OMZP::{git,sudo,encode64,extract} \ if'[[ -d /opt/google-cloud-sdk ]]' \ OMZP::gcloud \ if'[[ -f /etc/os-release ]] && source /etc/os-release && [[ "$ID" = arch ]]' \ OMZP::archlinux \ if'[[ -d ~/.nvm ]]' \ OMZP::nvm \ if'[[ -d ~/.ssh ]]' \ OMZP::ssh-agent \ if'[[ -d ~/.gnupg ]]' \ OMZP::gpg-agent \ if'[[ "$OSTYPE" = *-gnu ]]' \ OMZP::gnu-utils \ has'pip' \ OMZP::pip \ has'python' \ OMZP::pythonRegroupez l'exemple ci-dessus dans un seul fichier:
zi snippet <some/path/or/url/bundled-snippets.zsh
Utilisez zi ice svn si plusieurs fichiers nécessitent un sous-répertoire entier.
zi ice svnzi snippet OMZP::gitfastzi ice svnzi snippet OMZP::osxzi ice svnzi snippet OMZP::history-substring-searchUtilisez zi ice as "completion" pour ajouter directement des extraits de complétion de fichier unique.
zi ice as"completion"zi snippet OMZP::docker/_dockerzi ice as"completion"zi snippet OMZP::fd/_fdzi ice as"completion"zi snippet OMZP::ag/_agThèmes OMZ
Themes are stored in the themes directory. Tout est chargé en arrière-plan. with the simple syntax:
ZSH_THEME="robbyrussell"
Cependant, ZI ne prend pas en charge la variable ZSH_THEME de manière native.
Pour utiliser les thèmes créés pour OMZ, le chargement indiqué ci-dessous serait identique à celui d'OMZ en arrière-plan.
Some themes may require additional configuration it can be determined from the theme configuration file.
- Charger la bibliothèque
Git - Charger le plugin
Git - Charger les dépendances de la bibliothèque
- Activer
setopt promptsubst
If any of the above are not in order or missing, the theme will break similar as shown below:
… $(build_prompt) …
If the Git library is not loaded or loaded in the wrong order, then it may appear similar to the following:
........:1: Commande introuvable: git_prompt_status........:1: Commande introuvable: git_prompt_short_shaSi vous rencontrez un problème avec le thème, les bibliothèques de support OMZ doivent être chargées
Si votre thème ne se colore pas comme il le devrait, vous devrez charger
theme-and-appearance.zshIf you encounter an error message similar to:
zsh: command not found: ruby_prompt_infoVous devez charger prompt_info_functions.zsh
All together it looks like this:
zi snippet OMZL::git.zshzi snippet OMZP::gitzi snippet OMZL::theme-and-appearance.zshzi snippet OMZL::prompt_info_functions.zsh# Other libraries that might be neededzi cdclear -qThen load the prompt:
setopt promptsubstzi snippet OMZT::robbyrussellExternal theme sample: NicoSantangelo/Alpharized
Load with OMZ:
ZSH_THEME="alpharized"
Load with ZI:
zi snippet OMZL::git.zsh
Charger le plug-in Git:
zi snippet OMZP::gitzi cdclear -qsetopt promptsubstzi light NicoSantangelo/AlpharizedPrincipes de base de Prezto
Raw Syntax with URL:
zi snippet <URL>
Shorthand PZT: https://github.com/sorin-ionescu/prezto/tree/master/
zi snippet PZT::<PATH>
Shorthand PZT/modules:
zi snippet PZTM::<PATH>
Modules Prezto
Importing the environment and terminal Prezto Modules Sample:
Paramètre Prezto:
zstyle ":prezto:load" pmodule "environnement" "terminal"Réglage Zi:
Importer les données à partir d'une URL.
zi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/environment/init.zshzi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/terminal/init.zshSyntaxe abrégée PZT:
zi snippet PZT::modules/environmentzi snippet PZT::modules/terminalPZTM Shorthand Syntax:
zi snippet PZTM::environmentzi snippet PZTM::terminalUtilisez zi ice svn si plusieurs fichiers nécessitent un sous-répertoire entier.
zi ice svnzi snippet PZTM::dockerzi ice svnzi snippet PZTM::gitUtilisez zi ice as"null" si n'existe pas *.plugin.zsh, init.zsh, *.zsh-theme* fichiers dans module.
zi ice svn as"null"zi snippet PZTM::archiveUse zi ice atclone"git clone <repo> <location>" if module have external module.
- [complétion][14]:
zi ice svn blockf \ atclone"git clone --recursive https://github.com/zsh-users/zsh-completions.git external"zi snippet PZTM::completionUse blockf to prevent any unnecessary additions to fpath, as Zi manages fpath.
Qu'est-ce que zstyle?
- Official (zsh.sourceforge.net): zstyle
- StackExchange: What does
zstyledo?
Zgen
Charger la bibliothèque OMZ
- zgen oh-my-zsh+ zi snippet OMZL::<ANY OF THEM>Charger les plugins OMZ
- zgen oh-my-zsh <PATH>+ zi snippet OMZP::<PATH>Charger les modules Prezto
- zgen prezto+ zi snippet PZTM::<ANY FROM LIST BELOW>- environnement
- terminal
- editor
- history
- directory
- spectrum
- utility
- completion
- prompt
- zgen prezto <modulename>+ zi snippet PZTM::<modulename>Load repositories as prezto plugins:
- zgen pmodule <reponame> <branch>+ zi ice ver"<branch>"+ zi load <repo/plugin>Résumé de Zgen
Pour l' emplacement: voir sélection des fichiers
- zgen load <repo> [location] [branch]+ zi ice ver"[branch]"+ zi load <repo>Les Bases de Zplug
- zplug <repo/plugin>, tag1:<option1>, tag2:<option2>+ zi ice tag1"<option1>" tag2"<option2>"+ zi load <repo/plugin>Comparaison des tags
as=>asuse=>pick,src,multisrcignore=> Nonefrom=>fromat=>verrename-to=>mv,cpdir=> Selection(pick, …) with renameif=>ifhook-build=>atclone,atpullhook-load=>atloadfrozen=> Noneon=> Nonedefer=>waitlazy=>autoloaddepth=>depth
[14]: https://github. com/sorin-ionescu/prezto/tree/master/modules/completion