README.md 968 Bytes
Newer Older
Garth Mortensen's avatar
Garth Mortensen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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
24
25
urlencode 'https://github.com/ohmyzsh/ohmyzsh/search?q=urltools&type=Code'
# returns https%3A%2F%2Fgithub.com%2Fohmyzsh%2Fohmyzsh%2Fsearch%3Fq%3Durltools%26type%3DCode
Garth Mortensen's avatar
Garth Mortensen committed
26

27
28
urldecode 'https%3A%2F%2Fgithub.com%2Fohmyzsh%2Fohmyzsh%2Fsearch%3Fq%3Durltools%26type%3DCode'
# returns https://github.com/ohmyzsh/ohmyzsh/search?q=urltools&type=Code
Garth Mortensen's avatar
Garth Mortensen committed
29
```