Skip to content

Commit 643886c

Browse files
committed
feat(mysql): prefer mysqlshow from same dir
1 parent a4294f3 commit 643886c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

completions/mysql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ _comp_cmd_mysql()
1818
local cur prev words cword was_split comp_args
1919
_comp_initialize -s -- "$@" || return
2020

21+
# Prefer `mysqlshow` in the same dir as the command
22+
local pathcmd
23+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
24+
2125
local noargopts='!(-*|*[uDhSPeI]*)'
2226
# shellcheck disable=SC2254
2327
case $prev in

0 commit comments

Comments
 (0)