From 749173f1f6758780f2975fa988080bd92f361253 Mon Sep 17 00:00:00 2001 From: James Zhu Date: Tue, 22 Oct 2019 11:58:51 +0800 Subject: [PATCH] remove the title as cheat -l lists the title as well. --- scripts/cheat-autocompletion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cheat-autocompletion.bash b/scripts/cheat-autocompletion.bash index dbb05e6..95f6288 100755 --- a/scripts/cheat-autocompletion.bash +++ b/scripts/cheat-autocompletion.bash @@ -1,5 +1,5 @@ function _cheat_autocomplete { - sheets=$(cheat -l | cut -d' ' -f1) + sheets=$(cheat -l | sed -n '2,$p'|cut -d' ' -f1) COMPREPLY=() if [ $COMP_CWORD = 1 ]; then COMPREPLY=(`compgen -W "$sheets" -- $2`)