Skip to content
Snippets Groups Projects
Verified Commit c1d1089b authored by Baptiste Girard-Carrabin's avatar Baptiste Girard-Carrabin :speech_balloon:
Browse files

initial commit

parents
No related branches found
No related tags found
No related merge requests found
LICENSE 0 → 100644
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
# ViaRézo ZSH Theme
[![WTFPLv2 License](https://img.shields.io/badge/license-WTFPLv2-blue.svg)](http://www.wtfpl.net)
This is a list of little plugins that one can use with oh-my-zsh.
## Install plugins
In order to use these plugins, you have to clone this repository in your Oh-My-ZSH `custom/plugins` directory (usually `~/.oh-my-zsh/custom/plugins`):
```shell
git clone https://gitlab.viarezo.fr/ViaRezo/zsh-plugins.git $ZSH/custom/plugins
```
You then need to add the plugins you want to your `~/.zshrc` :
```shell
plugins=(... plugin_you_want)
```
## Customization
To create new plugins, juste create a directory with a .zsh file in it.
The directory and the file should be named with the name of your plugin :
```shell
plugin_name/plugin_name.plugin.zsh
```
## License
Unless explicitly stated to the contrary, all contents licensed under the [WTFPL](LICENSE).
# ------------------------------------------------------------------------------
# Description
# -----------
#
# watch will be inserted before the command
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Connard <baptiste.gc@student-cs.fr>
#
# ------------------------------------------------------------------------------
watch-command-line() {
[[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)"
# if [[ -n $EDITOR && $BUFFER == $EDITOR\ * ]]; then
# if [[ ${#LBUFFER} -le ${#EDITOR} ]]; then
# RBUFFER=" ${BUFFER#$EDITOR }"
# LBUFFER="sudoedit"
# else
# LBUFFER="sudoedit ${LBUFFER#$EDITOR }"
# fi
# elif [[ $BUFFER == sudoedit\ * ]]; then
# if [[ ${#LBUFFER} -le 8 ]]; then
# RBUFFER=" ${BUFFER#sudoedit }"
# LBUFFER="$EDITOR"
# else
# LBUFFER="$EDITOR ${LBUFFER#sudoedit }"
# fi
if [[ $BUFFER == watch\ * ]]; then
if [[ ${#LBUFFER} -le 4 ]]; then
RBUFFER="${BUFFER#watch }"
LBUFFER=""
else
LBUFFER="${LBUFFER#watch }"
fi
else
LBUFFER="watch $LBUFFER"
fi
}
zle -N watch-command-line
# Defined shortcut keys: [Alt] [Esc]
bindkey -M emacs '^\e' watch-command-line
bindkey -M vicmd '^\e' watch-command-line
bindkey -M viins '^\e' watch-command-line
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment