Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Declare-zsh is a parser for Zi commands in .zshrc.

License

NotificationsYou must be signed in to change notification settings

z-shell/declare-zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Introduction

declare-zsh is a parser forzi commands in.zshrc. It allows to perform the following actions on.zshrcfrom the command-line:

  • enable and disable selected plugins and snippets,
  • add plugins and snippets,
  • delete plugins and snippets,
  • it currently supports the classic ZI syntax only, i.e.: the one with two(zi ice …,zi load/snippet …) commands.

In other words, by issuing adeclzsh command the user deploys a task of:

  1. Reading and parsing of the~/.zshrc.

  2. Making changes (like removal of a plugin, i.e. ofzi load {the-removed-plugin} command together with the possible associatedzi ice … command) and then…

  3. Writing the result back to thezshrc (by default, the result is stored to~/.zshrc_gen file for safety, but the author wants to emhasize verystrongly, thatbreaking something within the parsedzshrc is nearlyimpossible and the tool can be safely used with option-o ~/.zshrc whichpointsdeclzsh to the originalzshrc as the destination output file).

Examples & Screenshots

  1. Exampledisabling of a plugin via thetoggle option-TT – thisworks because the commands preceded by: are ignored by the shell:screenshot

  2. Exampleaddition of a plugin via the option-AA – in order to alsoset up ice modifiers enclose them in a preceding square-bracket block, i.e.declzsh -AA '[ wait"1" lucid ] z-shell/null':screenshot

  3. Exampledeletion of a plugin via thepurge option-PP – theargument is treated as pattern, pass* to delete all plugins and snippets!:screenshot

Usage

Multiple actions, i.e. multiple options like-AA,-PP,-DD, etc. arepossible in a singledeclzsh run.

usage screenshot

About

Declare-zsh is a parser for Zi commands in .zshrc.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp