Skip to content

Zsh plugin to enhance git completion to include in the remotes completion (e.g. from `git clone`) any URL in the clipboard

License

Notifications You must be signed in to change notification settings

rapgenic/zsh-git-complete-urls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

zsh-git-complete-urls

Zsh plugin to enhance git completion to include in the remotes completion (e.g. from git clone) any URL in the clipboard

Installation

Just source zsh-git-complete-urls.plugin.zsh in your .zshrc.

The clipboard plugin (included for example in oh-my-zsh or available at zsh-clipboard as a single plugin) must be installed for zsh-git-complete-urls to work

Add the following line to your .zshrc:

zplug

zplug "rapgenic/zsh-git-complete-urls"

antigen

antigen bundle rapgenic/zsh-git-complete-urls

antibody

antibody bundle rapgenic/zsh-git-complete-urls

zgen

zgen load rapgenic/zsh-git-complete-urls

How does it work??

It just overrides one of the simplest functions in the default git zsh completion library, __git_any_repositories, which gives the suggestions for the repos, and by adding a single argument to the _alternative function:

'remote-clipboard::__git_remote_clipboard'

where __git_remote_clipboard is another function defined in the plugin file that gives back an url suggestion from the clipboard, that is then added to the list of suggestions returned.

About

Zsh plugin to enhance git completion to include in the remotes completion (e.g. from `git clone`) any URL in the clipboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages