1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

disabled zsh support

This commit is contained in:
Igor Chubin
2017-12-03 13:38:23 +00:00
parent 4f4d82283b
commit 0a873f580c
+29 -26
View File
@@ -1,27 +1,30 @@
# add this to ~/.zshrc or any other place that will be sourced by your .dotfiles script
cheat.sh()
{
# replace native with the color scheme you want
# curl cheat.sh/:styles-demo to show the available color schemes
curl -s cheat.sh/"$1"?style=native
}
_cheatsh_complete_cheatsh()
{
local cur opts #prev
_get_comp_words_by_ref -n : cur
COMPREPLY=()
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="$(curl -s cheat.sh/:list)"
#if [[ "${cur}" == ch ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
__ltrim_colon_completions "$cur"
return 0
#fi
}
compdef _cheatsh_complete_cheatsh cheat.sh
### Temporary disabled zsh support for cheat.sh
### This code has to be fixed
###
### # add this to ~/.zshrc or any other place that will be sourced by your .dotfiles script
###
### cheat.sh()
### {
### # replace native with the color scheme you want
### # curl cheat.sh/:styles-demo to show the available color schemes
### curl -s cheat.sh/"$1"?style=native
### }
###
### _cheatsh_complete_cheatsh()
### {
### local cur opts #prev
### _get_comp_words_by_ref -n : cur
###
### COMPREPLY=()
### prev="${COMP_WORDS[COMP_CWORD-1]}"
### opts="$(curl -s cheat.sh/:list)"
###
### #if [[ "${cur}" == ch ]] ; then
### COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
### __ltrim_colon_completions "$cur"
### return 0
### #fi
### }
###
### compdef _cheatsh_complete_cheatsh cheat.sh