Created
June 5, 2020 14:47
-
-
Save soraxas/00b7e3f8342e81d2b1908e91c0eb2a9d to your computer and use it in GitHub Desktop.
Revisions
-
soraxas revised this gist
Jun 5, 2020 . No changes.There are no files selected for viewing
-
soraxas revised this gist
Jun 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,4 @@ #complete -x -c tldr -a '(__fish_tldr_complete_available_pages)' # it is faster to find everything and use a single sed command to replace it to the correct format. complete -x -c tldr -a '(printf "%s\n" ~/.local/share/tldr/pages/**/*.md | sed -r "s:^.*/([^/]*)/([^/]*)\.md:\2\t\1:")' -
soraxas revised this gist
Jun 5, 2020 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,11 @@ # This is slower, to echo everything one by one. # # function __fish_tldr_complete_available_pages # for f in ~/.local/share/tldr/pages/**/*.md # echo (string replace -r '.*/([^/]*)\.md' '$1' $f) # end # end #complete -x -c tldr -a '(__fish_tldr_complete_available_pages)' # it is faster to find everything and use a single sed command to replace it to the correct format. complete -x -c tldr -a '(printf "%s\n" ~/.local/share/tldr/pages/**/*.md | sed -r "s:^.*/([^/]*)/([^/]*)\.md:\2\t\1:")' -
soraxas created this gist
Jun 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@