forked from ohmyzsh/ohmyzsh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19eacde
commit 68828a6
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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/robbyrussell/oh-my-zsh/search?q=urltools&type=Code' | ||
# returns https%3A%2F%2Fgithub.com%2Frobbyrussell%2Foh-my-zsh%2Fsearch%3Fq%3Durltools%26type%3DCode | ||
|
||
urldecode 'https%3A%2F%2Fgithub.com%2Frobbyrussell%2Foh-my-zsh%2Fsearch%3Fq%3Durltools%26type%3DCode' | ||
# returns https://github.com/robbyrussell/oh-my-zsh/search?q=urltools&type=Code | ||
``` |