Skip to content

tejasbubane/emacs-git-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emacs-git-io

MELPA

Interactive command to replace github URL at point with a shortened one using git.io.

Gets the URL at current cursor position, makes a request to git.io to get the shortened URL and replaces the original url with the shortened one.

Note: This package uses git.io which works only for github URLs.

Installation:

  • MELPA: Package is available for install in MELPA - git-io

  • Manual: Place the git-io.el file in your loadpath and require it: (require 'git-io).

Usage:

Once the package is loaded, an interactive command git-io-shorten is available. Point on the github url and invoke git-io-shorten command: M-x git-io-shorten.

Optionally, bind a key for quick usage:

(global-set-key (kbd "C-x \\") 'git-io-shorten)

Example:

See it in action:

Action

TODO:

  • Handle the invalid url error better - give proper message.
  • For some strange reason git.io does not work with http:// urls check for http:// urls and convert them to https:// before making request.
  • Write some tests.