Skip to content

Shorten a link, then copy it to the clipboard

License

Notifications You must be signed in to change notification settings

johanmcos/ShortNCopied

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ShortNCopied

A fish plugin

Summary:

Takes a URL from the command line, turn it into a bit.ly short link,and then copy it to the clipboard.
I don't use Xorg, so It only supports systems running Wayland. If someone wants to port it, that would be delightful.

Privacy:

Every time you run this function, the URL entered will be sent to bit.ly, and so will be subject to their privacy policy.
I have no association with them, commercial or otherwise, it's just the default service used by twzer.
They will save the long link, short link, and public IP address from which you made the request.

Requirements:

Make sure these are in your $PATH, here's a little how-to that I made.

Installation:

Copy shorten.fish to ~/.config/fish/functions/

Usage:

shorten 'https://example.com'

This will copy a shortened URL from bit.ly to your clipboard automatically.
Note the use of quotes to escape the URL, it won't work right if you're using a full URL and you don't use them.

Conclusion:

I hope you find this program useful, any feedback would be much appreciated.
If you'd like to buy me a cup of coffee, you may send a donation through PayPal

License:

This program is licensed under GPLv3

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See the License file for more details.

About

Shorten a link, then copy it to the clipboard

Topics

Resources

License

Stars

Watchers

Forks

Languages