mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-23 19:43:33 +03:00
Merge branch 'master' of https://github.com/chubin/cheat.sh
This commit is contained in:
commit
f50e35b91d
23
share/bash.txt
Normal file
23
share/bash.txt
Normal file
@ -0,0 +1,23 @@
|
||||
cht()
|
||||
{
|
||||
curl -s cheat.sh/"$1"?style=native
|
||||
}
|
||||
|
||||
_cheatsh_complete_cht()
|
||||
{
|
||||
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}" == cht ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
__ltrim_colon_completions "$cur"
|
||||
return 0
|
||||
#fi
|
||||
}
|
||||
|
||||
complete -F _cheatsh_complete_cht cht
|
||||
|
Loading…
Reference in New Issue
Block a user