my $opt = $self->{opt};
my $mirror = $opt->{mirror} // do {
my @fail;
for my $sw ($self->index_opt, $self->curl_opt,
my $opt = $self->{opt};
my $mirror = $opt->{mirror} // do {
my @fail;
for my $sw ($self->index_opt, $self->curl_opt,
my ($f) = (split(/|/, $sw, 2))[0];
next unless defined $opt->{$f};
$f = length($f) == 1 ? "-$f" : "--$f";
my ($f) = (split(/|/, $sw, 2))[0];
next unless defined $opt->{$f};
$f = length($f) == 1 ? "-$f" : "--$f";
# Workaround bash word-splitting URLs to ['https', ':', '//' ...]
# Maybe there's a better way to go about this in
# contrib/completion/lei-completion.bash
my $re = '';
# Workaround bash word-splitting URLs to ['https', ':', '//' ...]
# Maybe there's a better way to go about this in
# contrib/completion/lei-completion.bash
my $re = '';
# FIXME: bash completion off "http:" or "https:" when the last
# character is a colon doesn't work properly even if we're
# returning "//$HTTP_HOST/$PATH_INFO/", not sure why, could
# FIXME: bash completion off "http:" or "https:" when the last
# character is a colon doesn't work properly even if we're
# returning "//$HTTP_HOST/$PATH_INFO/", not sure why, could
sub _complete_add_external { # for bash, this relies on "compopt -o nospace"
my ($self, @argv) = @_;
my $cfg = $self->_lei_cfg;
sub _complete_add_external { # for bash, this relies on "compopt -o nospace"
my ($self, @argv) = @_;
my $cfg = $self->_lei_cfg;