Skip to content

yurenchen000/howto.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

howto.sh

the bash version of https://github.com/antonmedv/howto

asciicast demo1

asciicast demo2

usage

in bash

1. setup

$ source deepseek.sh  bind1
$ HOWTO_APIKEY='your deepseek apikey'

2. usage demo

$ howto find files modified today
== cmd is: find / -type f -mtime 0
$ find / -type f -mtime 0      <### this line auto-inputed by howto.sh, omitted in later

$ howto git clone use ssh:// for 'ssh android@localhost -p 4022' /tmp/test1
$                              <### sometime i forget the git url scheme
== cmd is: git clone ssh://android@localhost:4022/tmp/test1

$ howto convert demo2.gif to demo2.mp4, frame rate 30, twitter compatible  
$                              <### i guess no one remember all the parameters
== cmd is: ffmpeg -i demo2.gif -vf "fps=30,scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -pix_fmt yuv420p demo2.mp4

note1: AI may make mistakes, check before pressing Enter

note2: deepseek query is slow (about 4 seconds)


TIPS: Ctrl + G will prepend howto cmd and query


3. use ctrl+g completion

bind -x '"\C-g": "c_howto"'

//this will show howto in cli & history

OR

bind -x '"\C-g": "c_howto2"'

//this not show howto in cli & history

then input the search string, for example:

$ find files modified today

then press Ctrl+G to trigger completion


Other Bash Script

other bash repos