From tux at freedom.nl Mon Oct 20 06:54:39 2025 From: tux at freedom.nl (H.Merijn Brand) Date: Mon, 20 Oct 2025 08:54:39 +0200 Subject: [Tcsh] Question on completion Message-ID: <20251020084817.4fa6ccd4@pc09> I am a perl developer and write a lot of perl tooling for work related tasks. Most of the times the commands/scripts have a .pl extension. Is there a completion-rule that would change % my-tool --option-a --option-b=5 foo bar baz to % my-tool.pl --option-a --option-b=5 foo bar baz if "my-tool" is *not* available in $PATH, but "my-tool.pl" *is*? Other than creation a ton of aliasses -- H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.37 porting perl5 on HP-UX, AIX, and Linux https://tux.nl/email.html http://qa.perl.org https://www.test-smoke.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From christos at zoulas.com Wed Oct 22 17:29:04 2025 From: christos at zoulas.com (Christos Zoulas) Date: Wed, 22 Oct 2025 13:29:04 -0400 Subject: [Tcsh] Question on completion In-Reply-To: <20251020084817.4fa6ccd4@pc09> References: <20251020084817.4fa6ccd4@pc09> Message-ID: On 2025-10-20 2:54 am, H.Merijn Brand wrote: > I am a perl developer and write a lot of perl tooling for work related > tasks. Most of the times the commands/scripts have a .pl extension. > > Is there a completion-rule that would change > > > % my-tool --option-a --option-b=5 foo bar baz > > to > > % my-tool.pl --option-a --option-b=5 foo bar baz > > if "my-tool" is *not* available in $PATH, but "my-tool.pl" *is*? > > Other than creation a ton of aliasses No, but it should be simple to implement via a variable like execextension=(.pl ...) and have the exec code go through the list and try them. christos