mirror of
https://github.com/cheat/cheat.git
synced 2024-12-26 14:39:44 +01:00
Tweak delays
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
parent
94d94d19e0
commit
8a5e3c2f85
@ -15,10 +15,6 @@ configure() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set a custom prompt (optional)
|
|
||||||
# prompt() {
|
|
||||||
# }
|
|
||||||
|
|
||||||
# timeout a command but only in demo mode
|
# timeout a command but only in demo mode
|
||||||
demo_timeout() {
|
demo_timeout() {
|
||||||
if mode demo; then
|
if mode demo; then
|
||||||
@ -62,7 +58,7 @@ run() {
|
|||||||
# This is where the demo/tutorial happens # Command tracker
|
# This is where the demo/tutorial happens # Command tracker
|
||||||
M "Read cheat sheets"
|
M "Read cheat sheets"
|
||||||
e cheat tar #
|
e cheat tar #
|
||||||
unbuffer timeout 2 cheat tar
|
demo_timeout 2.5 cheat tar
|
||||||
|
|
||||||
demo_clear
|
demo_clear
|
||||||
M "Comes with many cheat sheets preinstalled"
|
M "Comes with many cheat sheets preinstalled"
|
||||||
@ -72,37 +68,37 @@ run() {
|
|||||||
demo_clear
|
demo_clear
|
||||||
M "Search for a command"
|
M "Search for a command"
|
||||||
e cheat -s git #
|
e cheat -s git #
|
||||||
demo_timeout 1.5 cheat -s git
|
demo_timeout 2 cheat -s git
|
||||||
|
|
||||||
demo_clear
|
demo_clear
|
||||||
M "Organize cheat sheets by tag"
|
M "Organize cheat sheets by tag"
|
||||||
c cheat --tag vcs #
|
c cheat --tag vcs #
|
||||||
|
|
||||||
demo_prompt
|
demo_prompt
|
||||||
mode demo && sleep 1
|
mode demo && sleep 1.5
|
||||||
|
|
||||||
demo_clear
|
demo_clear
|
||||||
mkdir .cheat
|
mkdir .cheat
|
||||||
generate_custom_cheatsheet > .cheat/mycommand
|
generate_custom_vim_cheatsheet > .cheat/custom_vim
|
||||||
rm .lesshst
|
rm .lesshst
|
||||||
|
|
||||||
M "Local cheat sheets"
|
M "Local cheat sheets"
|
||||||
e tree -a #
|
e tree -a #
|
||||||
tree -a --noreport
|
tree -a --noreport
|
||||||
e cheat mycommand #
|
e cheat custom_vim #
|
||||||
cheat mycommand
|
cheat custom_vim
|
||||||
|
|
||||||
demo_prompt
|
demo_prompt
|
||||||
if mode demo; then sleep 1.5; fi
|
if mode demo; then sleep 1.5; fi
|
||||||
|
|
||||||
demo_clear
|
demo_clear
|
||||||
M "Easily edit cheat sheets"
|
M "Easily edit cheat sheets"
|
||||||
e cheat -e mycommand #
|
e cheat -e custom_vim #
|
||||||
if mode demo; then
|
if mode demo; then
|
||||||
# NOTE: A bit of a hack needed to display the editor
|
# NOTE: A bit of a hack needed to display the editor
|
||||||
timeout 2 tmux new-session "vim -R .cheat/mycommand" >/dev/null
|
timeout 2 tmux new-session "vim -R .cheat/custom_vim" >/dev/null
|
||||||
else
|
else
|
||||||
cheat -e mycommand
|
cheat -e custom_vim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
demo_clear
|
demo_clear
|
||||||
@ -111,9 +107,6 @@ run() {
|
|||||||
|
|
||||||
# Demo ends here
|
# Demo ends here
|
||||||
if mode demo; then c exit; fi
|
if mode demo; then c exit; fi
|
||||||
|
|
||||||
# But the tutorial can continue beyond here
|
|
||||||
# TODO...
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: filetype=sh
|
# vim: filetype=sh
|
||||||
|
Loading…
Reference in New Issue
Block a user