Skip to content

Commit 9f5ce04

Browse files
committed
fix perl completions
Fixes fish-shell#3856
1 parent a9617f9 commit 9f5ce04

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

share/completions/perl.fish

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# TODO: Remove the `begin;...;end` brackets since they're not necessary. A `set -l` at file level
2+
# creates a var local to the file which won't be visible elsewhere. I'm not doing so as part of
3+
# fixing issue #3856 because I don't want to take ownership of every line in this script.
4+
#
5+
# TODO: Whether the expensive operations
6+
# done by the module detection really needs to be done every time the completion is invoked is
7+
# unclear. See issue #3856.
18
begin
29
set -l unicode 'commandline | __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"'
310
set -l noopt 'commandline | not __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"'
411
set -l modules "(find (perl -lE'print for @INC') -name '*.pm' -printf '%P\n' ^/dev/null \
5-
| sed -e 's,/,::,g; s,\.pm$,,' | sort -u)"
12+
| sed -e 's,/,::,g; s,\.pm\$,,' | sort -u)"
613
complete -c perl -s 0 -n $noopt --description 'Specify record separator'
714
complete -c perl -s a -n $noopt --description 'Turn on autosplit mode'
815
complete -c perl -s c -n $noopt --description 'Check syntax'

0 commit comments

Comments
 (0)