Skip to content

Commit

Permalink
Apply tldr-pages#105's fix here and remove unrequired hadnling of def…
Browse files Browse the repository at this point in the history
…ault case.
  • Loading branch information
lakshayrohila authored Feb 15, 2024
1 parent d28b432 commit 3715667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autocomplete/complete.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

# usage: _tldr_get_files [architecture] [semi-completed word to search]
_tldr_get_files() {
find "$HOME"/.tldrc/tldr/pages/"$1" -name "$2"'*.md' -exec basename {} .md \;
find "$HOME"/.tldrc/tldr/pages/"$1" -name "$2"'*.md' -exec basename -s .md {} +
}

_tldr_complete() {
COMPREPLY=()
local word="${COMP_WORDS[COMP_CWORD]}"
local cmpl=""
if [[ "$word" == "--"* ]] || [ -z "$word" ]; then
if [[ "$word" == "--"* ]]; then
cmpl=$'--help\n--color\n--platform\n--render\n--update\n--version\n--clear-cache\n--verbose\n--list'
elif [[ "$word" == "-"* ]]; then
cmpl=$'-h\n-C\n-p\n-r\n-u\n-v\n-c\n-V\n-l'
Expand Down

0 comments on commit 3715667

Please sign in to comment.