mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-20 19:31:58 +00:00
b80b1a1e8b
* Change project URL from robbyrussell to ohmyzsh org * Update git remote to use ohmyzsh org repository
29 lines
968 B
Markdown
29 lines
968 B
Markdown
# URLTools plugin
|
|
|
|
This plugin provides two aliases to URL-encode and URL-decode strings.
|
|
|
|
To start using it, add the `urltools` plugin to your plugins array in `~/.zshrc`:
|
|
|
|
```zsh
|
|
plugins=(... urltools)
|
|
```
|
|
|
|
Original author: [Ian Chesal](https://github.com/ianchesal)
|
|
Original idea and aliases: [Ruslan Spivak](https://ruslanspivak.wordpress.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/)
|
|
|
|
## Commands
|
|
|
|
| Command | Description |
|
|
| :---------- | :--------------------------- |
|
|
| `urlencode` | URL-encodes the given string |
|
|
| `urldecode` | URL-decodes the given string |
|
|
|
|
## Examples
|
|
|
|
```zsh
|
|
urlencode 'https://github.com/ohmyzsh/ohmyzsh/search?q=urltools&type=Code'
|
|
# returns https%3A%2F%2Fgithub.com%2Fohmyzsh%2Fohmyzsh%2Fsearch%3Fq%3Durltools%26type%3DCode
|
|
|
|
urldecode 'https%3A%2F%2Fgithub.com%2Fohmyzsh%2Fohmyzsh%2Fsearch%3Fq%3Durltools%26type%3DCode'
|
|
# returns https://github.com/ohmyzsh/ohmyzsh/search?q=urltools&type=Code
|
|
```
|