We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd8c870 commit 395e463Copy full SHA for 395e463
completions/portinstall
@@ -5,6 +5,8 @@ _comp_cmd_portinstall()
5
local cur prev words cword comp_args
6
_comp_initialize -- "$@" || return
7
8
+ [[ $prev == -l || $prev == -L || $prev == -o ]] && return
9
+
10
local portsdir indexfile
11
local -a COMPREPLY2
12
@@ -15,8 +17,7 @@ _comp_cmd_portinstall()
15
17
# Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x
16
18
[[ ${OSTYPE%.*} == freebsd5 && -f $indexfile ]] ||
19
indexfile=$portsdir/INDEX
-
- [[ $prev == -l || $prev == -L || $prev == -o ]] && return
20
+ [[ -f $indexfile && -r $indexfile ]] || return
21
22
COMPREPLY=($(command grep -E "^$cur" 2>/dev/null <"$indexfile" |
23
cut -d'|' -f1))
0 commit comments