Skip to content

Commit 5cce639

Browse files
committed
refactor(_mount{,.linux}): use _comp_compgen -P for //host/...
1 parent 21d1c64 commit 5cce639

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

completions/_mount

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _comp_cmd_mount()
4444
host=${cur#//}
4545
host=${host%%/*}
4646
if [[ $host ]]; then
47-
_comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$(
47+
_comp_compgen -P "//$host" split -- "$(
4848
smbclient -d 0 -NL "$host" 2>/dev/null |
4949
command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' |
5050
command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p'

completions/_mount.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ _comp_cmd_mount()
231231
host=${cur#//}
232232
host=${host%%/*}
233233
if [[ $host ]]; then
234-
_comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$(
234+
_comp_compgen -P "//$host" split -- "$(
235235
smbclient -d 0 -NL "$host" 2>/dev/null |
236236
command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' |
237237
command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p'

0 commit comments

Comments
 (0)