Skip to content

Commit

Permalink
docs: improve several plugin READMEs and add one for ssh plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Aug 9, 2024
1 parent fccaaf2 commit efafef8
Show file tree
Hide file tree
Showing 23 changed files with 123 additions and 90 deletions.
4 changes: 2 additions & 2 deletions plugins/aliases/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Aliases cheatsheet

**Maintainer:** [@hqingyi](https://github.com/hqingyi)

With lots of 3rd-party amazing aliases installed, this plugin helps list the shortcuts
that are currently available based on the plugins you have enabled.

Expand All @@ -13,6 +11,8 @@ plugins=(aliases)

Requirements: Python needs to be installed.

**Maintainer:** [@hqingyi](https://github.com/hqingyi)

## Usage

- `als`: show all aliases by group
Expand Down
2 changes: 0 additions & 2 deletions plugins/ansible/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# ansible plugin

## Introduction

The `ansible plugin` adds several aliases for useful [ansible](https://docs.ansible.com/ansible/latest/index.html) commands and [aliases](#aliases).

To use it, add `ansible` to the plugins array of your zshrc file:
Expand Down
1 change: 1 addition & 0 deletions plugins/arduino-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Arduino CLI plugin

This plugin adds completion for the [arduino-cli](https://github.com/arduino/arduino-cli) tool.

To use it, add `arduino-cli` to the plugins array in your zshrc file:

```zsh
Expand Down
6 changes: 4 additions & 2 deletions plugins/asdf/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## asdf

**Maintainer:** [@RobLoach](https://github.com/RobLoach)

Adds integration with [asdf](https://github.com/asdf-vm/asdf), the extendable version manager, with support for Ruby, Node.js, Elixir, Erlang and more.

### Installation
Expand All @@ -28,3 +26,7 @@ asdf install nodejs latest
asdf global nodejs latest
asdf local nodejs latest
```

### Maintainer

- [@RobLoach](https://github.com/RobLoach)
2 changes: 1 addition & 1 deletion plugins/chucknorris/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chucknorris

Chuck Norris fortunes plugin for Oh My Zsh. Perfectly suitable as MOTD.
Fortunes plugin for Chuck Norris for Oh My Zsh. Perfectly suitable as MOTD.

To use it add `chucknorris` to the plugins array in you zshrc file.

Expand Down
6 changes: 2 additions & 4 deletions plugins/dbt/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# dbt plugin

## Introduction

The `dbt plugin` adds several aliases for useful [dbt](https://docs.getdbt.com/) commands and
[aliases](#aliases).

To use it, add `dbt` to the plugins array of your zshrc file:

```
```zsh
plugins=(... dbt)
```

Expand All @@ -26,4 +24,4 @@ plugins=(... dbt)

## Maintainer

### [msempere](https://github.com/msempere)
- [msempere](https://github.com/msempere)
12 changes: 11 additions & 1 deletion plugins/fancy-ctrl-z/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Use Ctrl-Z to switch back to Vim
# fancy-ctrl-z

Allows pressing Ctrl-Z again to switch back to a background job.

To use it, add `fancy-ctrl-z` to the plugins array in your zshrc file:

```zsh
plugins=(... fancy-ctrl-z)
```

## Motivation

I frequently need to execute random commands in my shell. To achieve it I pause
Vim by pressing Ctrl-z, type command and press fg<Enter> to switch back to Vim.
Expand Down
2 changes: 1 addition & 1 deletion plugins/gatsby/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gatsby autocomplete plugin

* Adds autocomplete options for all gatsby commands.
Adds autocomplete options for all gatsby commands.

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions plugins/isodate/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Isodate plugin

**Maintainer:** [@Frani](https://github.com/frani)

This plugin adds completion for the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601),
as well as some aliases for common Date commands.

Expand All @@ -11,6 +9,8 @@ To use it, add `isodate` to the plugins array in your zshrc file:
plugins=(... isodate)
```

**Maintainer:** [@Frani](https://github.com/frani)

## Aliases

| Alias | Command | Description |
Expand Down
46 changes: 24 additions & 22 deletions plugins/jira/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# Jira plugin #
# Jira plugin

CLI support for JIRA interaction
This plugin provides command line tools for interacting with Atlassian's [JIRA](https://www.atlassian.com/software/jira) bug tracking software.

## Description ##
To use it, add `jira` to the plugins array in your zshrc file:

This plugin provides command line tools for interacting with Atlassian's [JIRA](https://www.atlassian.com/software/jira) bug tracking software.
```zsh
plugins=(... jira)
```

The interaction is all done through the web. No local installation of JIRA is necessary.

In this document, "JIRA" refers to the JIRA issue tracking server, and `jira` refers to the command this plugin supplies.

## Usage ##
## Usage

This plugin supplies one command, `jira`, through which all its features are exposed. Most forms of this command open a JIRA page in your web browser.

## Commands

`jira help` or `jira usage` will print the below usage instructions

| Command | Description |
| :------------ | :-------------------------------------------------------- |
| `jira` | Performs the default action |
| `jira new` | Opens a new Jira issue dialogue |
| `jira ABC-123` | Opens an existing issue |
| `jira ABC-123 m` | Opens an existing issue for adding a comment |
| `jira dashboard [rapid_view]` | Opens your JIRA dashboard |
| `jira mine` | Queries for your own issues |
| `jira tempo` | Opens your JIRA Tempo |
| `jira reported [username]` | Queries for issues reported by a user |
| `jira assigned [username]` | Queries for issues assigned to a user |
| `jira branch` | Opens an existing issue matching the current branch name |
| `jira help` | Prints usage instructions |
| Command | Description |
| :---------------------------- | :------------------------------------------------------- |
| `jira` | Performs the default action |
| `jira new` | Opens a new Jira issue dialogue |
| `jira ABC-123` | Opens an existing issue |
| `jira ABC-123 m` | Opens an existing issue for adding a comment |
| `jira dashboard [rapid_view]` | Opens your JIRA dashboard |
| `jira mine` | Queries for your own issues |
| `jira tempo` | Opens your JIRA Tempo |
| `jira reported [username]` | Queries for issues reported by a user |
| `jira assigned [username]` | Queries for issues assigned to a user |
| `jira branch` | Opens an existing issue matching the current branch name |
| `jira help` | Prints usage instructions |


### Jira Branch usage notes
Expand All @@ -43,15 +45,15 @@ This is also checks if the prefix is in the name, and adds it if not, so: "MP-12



#### Debugging usage ####
#### Debugging usage

These calling forms are for developers' use, and may change at any time.

```
jira dumpconfig # displays the effective configuration
```

## Setup ##
## Setup

The URL for your JIRA instance is set by `$JIRA_URL` or a `.jira_url` file.

Expand All @@ -68,7 +70,7 @@ echo "https://jira.atlassian.com" >> .jira-url

(Note: The current implementation only looks in the current directory for `.jira-url` and `.jira-prefix`, not up the path, so if you are in a subdirectory of your project, it will fall back to your default JIRA URL. This will probably change in the future though.)

### Variables ###
### Variables

* `$JIRA_URL` - Your JIRA instance's URL
* `$JIRA_NAME` - Your JIRA username; used as the default user for `assigned`/`reported` searches
Expand All @@ -79,6 +81,6 @@ echo "https://jira.atlassian.com" >> .jira-url
* `$JIRA_TEMPO_PATH` - Your JIRA tempo url path; defaults to "/secure/Tempo.jspa"


### Browser ###
### Browser

Your default web browser, as determined by how `open_command` handles `http://` URLs, is used for interacting with the JIRA instance. If you change your system's URL handler associations, it will change the browser that `jira` uses.
3 changes: 1 addition & 2 deletions plugins/kube-ps1/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
kube-ps1: Kubernetes prompt for bash and zsh
============================================
# kube-ps1: Kubernetes prompt for bash and zsh

A script that lets you add the current Kubernetes context and namespace
configured on `kubectl` to your Bash/Zsh prompt strings (i.e. the `$PS1`).
Expand Down
3 changes: 1 addition & 2 deletions plugins/per-directory-history/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
per-directory-history plugin
----------------------------
# per-directory-history plugin

This plugin adds per-directory history for zsh, as well as a global history,
and the ability to toggle between them with a keyboard shortcut. This is a
Expand Down
4 changes: 1 addition & 3 deletions plugins/pipenv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pipenv

## Installation
This plugin provides some features to simplify the use of [Pipenv](https://pipenv.pypa.io/) while working on ZSH.

In your `.zshrc` file, add `pipenv` to the plugins section

Expand All @@ -10,8 +10,6 @@ plugins=(... pipenv ...)

## Features

This plugin provides some features to simplify the use of Pipenv while working on ZSH.

- Adds completion for pipenv
- Auto activates and deactivates pipenv shell
- Adds short aliases for common pipenv commands
Expand Down
14 changes: 5 additions & 9 deletions plugins/spring/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Spring Boot oh-my-zsh plugin
oh-my-zsh Spring Boot plugin

## Spring Boot autocomplete plugin
Adds autocomplete options for all [Spring Boot](https://spring.io/projects/spring-boot) commands.

- Adds autocomplete options for all spring boot commands.
To use it, add `spring` to the plugins array in your zshrc file:

## Manual Install

$ cd ~/.oh-my-zsh/plugins
$ git clone [email protected]:linux-china/oh-my-zsh-spring-boot-plugin.git spring

Adjust your .zshrc file and add spring to plugins=(...)
```zsh
plugins=(... spring)
```

## Tips

Expand Down
16 changes: 16 additions & 0 deletions plugins/ssh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ssh plugin

This plugin provides host completion based off of your `~/.ssh/config` file, and adds
some utility functions to work with SSH keys.

To use it, add `ssh` to the plugins array in your zshrc file:

```zsh
plugins=(... ssh)
```

## Functions

- `ssh_rmhkey`: remove host key from known hosts based on a host section name from `.ssh/config`.
- `ssh_load_key`: load SSH key into agent.
- `ssh_unload_key`: remove SSH key from agent.
8 changes: 5 additions & 3 deletions plugins/suse/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# suse

**Maintainer**: [r-darwish](https://github.com/r-darwish)

Alias for Zypper according to the official Zypper's alias
Aliases for [Zypper](https://en.opensuse.org/Portal:Zypper) according to the official Zypper's alias

To use it add `suse` to the plugins array in you zshrc file.

```zsh
plugins=(... suse)
```

**Maintainer**: [r-darwish](https://github.com/r-darwish)

## Main commands

| Alias | Commands | Description |
Expand Down Expand Up @@ -79,6 +79,7 @@ Related: [#9798](https://github.com/ohmyzsh/ohmyzsh/pull/9798).
| zrr | `sudo zypper rr` | remove repositories |

## Services commands

| Alias | Commands | Description |
| ----- | ------------------ | -------------------------------------------------------------- |
| zas | `sudo zypper as` | adds a service specified by URI to the system |
Expand All @@ -88,6 +89,7 @@ Related: [#9798](https://github.com/ohmyzsh/ohmyzsh/pull/9798).
| zls | `zypper ls` | list services defined on the system |

## Package Locks Management commands

| Alias | Commands | Description |
| ----- | ---------------- | ----------------------------------- |
| zal | `sudo zypper al` | add a package lock |
Expand Down
2 changes: 0 additions & 2 deletions plugins/swiftpm/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Swift Package Manager

## Description

This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager), as well as autocompletion for Swift 5.9.

To start using it, add the `swiftpm` plugin to your `plugins` array in `~/.zshrc`:
Expand Down
31 changes: 29 additions & 2 deletions plugins/vagrant-prompt/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# vagrant-prompt

This plugin prompts the status of the Vagrant VMs. It supports single-host and
multi-host configurations as well.

Look inside the source for documentation about custom variables.
To use it, add `vagrant-prompt` to the plugins array in your zshrc file:

```zsh
plugins=(... vagrant-prompt)
```

**Alberto Re <[email protected]>**

## Usage

To display Vagrant info on your prompt add the `vagrant_prompt_info` to the
`$PROMPT` or `$RPROMPT` variable in your theme. Example:

```zsh
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(vagrant_prompt_info)$(svn_prompt_info)$(git_prompt_info)%(!.#.$) '
```

`vagrant_prompt_info` makes use of some custom variables. This is an example
definition:

Alberto Re <[email protected]>
```zsh
ZSH_THEME_VAGRANT_PROMPT_PREFIX="%{$fg_bold[blue]%}["
ZSH_THEME_VAGRANT_PROMPT_SUFFIX="%{$fg_bold[blue]%}]%{$reset_color%} "
ZSH_THEME_VAGRANT_PROMPT_RUNNING="%{$fg_no_bold[green]%}●"
ZSH_THEME_VAGRANT_PROMPT_POWEROFF="%{$fg_no_bold[red]%}●"
ZSH_THEME_VAGRANT_PROMPT_SUSPENDED="%{$fg_no_bold[yellow]%}●"
ZSH_THEME_VAGRANT_PROMPT_NOT_CREATED="%{$fg_no_bold[white]%}○"
```
17 changes: 0 additions & 17 deletions plugins/vagrant-prompt/vagrant-prompt.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# vim:ft=zsh ts=2 sw=2 sts=2
#
# To display Vagrant infos on your prompt add the vagrant_prompt_info to the
# $PROMPT variable in your theme. Example:
#
# PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(vagrant_prompt_info)$(svn_prompt_info)$(git_prompt_info)%(!.#.$) '
#
# `vagrant_prompt_info` makes use of some custom variables. This is an example
# definition:
#
# ZSH_THEME_VAGRANT_PROMPT_PREFIX="%{$fg_bold[blue]%}["
# ZSH_THEME_VAGRANT_PROMPT_SUFFIX="%{$fg_bold[blue]%}]%{$reset_color%} "
# ZSH_THEME_VAGRANT_PROMPT_RUNNING="%{$fg_no_bold[green]%}●"
# ZSH_THEME_VAGRANT_PROMPT_POWEROFF="%{$fg_no_bold[red]%}●"
# ZSH_THEME_VAGRANT_PROMPT_SUSPENDED="%{$fg_no_bold[yellow]%}●"
# ZSH_THEME_VAGRANT_PROMPT_NOT_CREATED="%{$fg_no_bold[white]%}○"

function vagrant_prompt_info() {
local vm_states vm_state
if [[ -d .vagrant && -f Vagrantfile ]]; then
Expand Down
Loading

0 comments on commit efafef8

Please sign in to comment.