From: Asger Hautop Drewsen Date: Tue, 7 Jan 2025 14:56:52 +0000 (+0100) Subject: completion.pl: add completion for paths after @ for fish X-Git-Tag: curl-8_12_0~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cacceef5a65db2e00834ddc3ce11b6f0578171d4;p=thirdparty%2Fcurl.git completion.pl: add completion for paths after @ for fish Closes #15928 --- diff --git a/scripts/completion.pl b/scripts/completion.pl index 00c736898a..dd0c81d35b 100755 --- a/scripts/completion.pl +++ b/scripts/completion.pl @@ -43,6 +43,9 @@ my @opts = parse_main_opts('--help all', $regex); if ($shell eq 'fish') { print "# curl fish completion\n\n"; + print "# Complete file paths after @\n"; + print q(complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -k -xa "(printf '%s\n' -- @(__fish_complete_suffix --complete=(commandline -ct | string replace -r '^@' '') ''))"); + print "\n\n"; print qq{$_ \n} foreach (@opts); } elsif ($shell eq 'zsh') { my $opts_str;