diff --git a/README.md b/README.md index 07e81be..ee78824 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,35 @@ uwu() { } ``` +#### fish +```bash +function uwu + # delete these 10 lines if you don't want the Thinking spinner + set -l frames "⠋" "⠙" "⠹" "⠸" "⠼" "⠴" "⠦" "⠧" "⠇" "⠏" + fish -c ' + while true + for frame in "⠋" "⠙" "⠹" "⠸" "⠼" "⠴" "⠦" "⠧" "⠇" "⠏" + printf "\r$frame Thinking..." + sleep 0.1 + end + end + ' & + set -l spinner_pid (jobs -lp | tail -n1) + + set -l command (uwu-cli $argv < /dev/null 2>&1) # don't delete this + + # also delete these 2 lines you don't want the Thinking spinner + kill $spinner_pid 2>/dev/null + printf "\r \r" + + if test -n "$command" + commandline --insert "$command" + end + + commandline -f repaint +end +``` + #### Powershell / Conhost / Windows Terminal Note: This only applies to Windows with Powershell installed