Skip to content

fid-kill autocomplete is broken #949

@tiymat

Description

@tiymat

Describe the bug:
Write fid-kill
Press Tab

Output resembles

[~] > fid-kill 
                                                                                                                                                                             
 0   ["3732","[","FID
 1   Command
 2   Parameters
 3   ]"]
 4   -setsid
 5   /usr/bin/murex"]

Expected behaviour:
Proper autocomplete values. For example, the current implementation will always suggest 0 first, which if I understand right is the shell process itself!

Screenshots:
N/A

Platform (please complete the following information):

  • OS, output from uname -a if supported: 6.16.10-arch1-1
  • Terminal Emulator: Kitty 0.43.1
  • Murex version, output from version --no-app-name: 7.0.2107

Additional context

Attempted a fix via the following patch, which at least resulted in selectable output, but the commands run during the autocomplete function itself were also present, cluttering the output. If I open helix and suspend it, when I run fid-kill and tab with my patch applied there are 8 results, when really I'm only interested in the one I manually suspended.

Maybe this is unavoidable though? I can't think of a non-brittle way to filter them out.

Patch:

diff --git a/config/defaults/profile_any.mx b/config/defaults/profile_any.mx
index 672da610..2cb559f2 100644
--- a/config/defaults/profile_any.mx
+++ b/config/defaults/profile_any.mx
@@ -820,7 +820,7 @@ autocomplete set !openagent %[

 private autocomplete.fid-kill {
    # Returns a 2D array FIDs
-    fid-list --jsonl -> [ FID Command Parameters ]
+    fid-list --jsonl -> [ FID Command Parameters ] -> [2..] -> foreach --jmap job { out $job[0] } { $job -> [2..] -> mjoin ' ' }
 }

 test unit private autocomplete.fid-kill %{
@@ -847,4 +847,4 @@ autocomplete set fg %[{
         -> alter -m / ${ fid-list --stopped }
     }'
     ListView: true
-}]
\ No newline at end of file
+}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected behaviordeployed to `develop`Feature built. Currently BETA testing in the `develop` branchin progressIssue is currently being worked on (possibly in a feature branch)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions