Skip to content

Commit 3715667

Browse files
Apply tldr-pages#105's fix here and remove unrequired hadnling of default case.
1 parent d28b432 commit 3715667

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autocomplete/complete.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

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

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

0 commit comments

Comments
 (0)