Replies: 2 comments 7 replies
-
If we actually want to pass |
Beta Was this translation helpful? Give feedback.
1 reply
-
External xfunc callers should not generally indicate the command though, because that would be making assumptions about the xfunc's internal implementation details. Passing the command to invoke would be generally something only callers in the same file whould do. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Invoking a utility or a xfunc function often involves executing a "main" command. Some functions take it as the first positional parameter, some take it as the last, and some just hardcode one. For example the functions in completions/ssh, many xfunc functions throughout, etc.
I suggest we make this consistent. Positional parameters are inflexible and somewhat ugly for this, so I'm proposing we use a variable to indicate it. Perhaps a consistently named one for this one purpose would be handy.
So for example, let's say
$xcmd
(for both xfunc and utility, never mind thex
):...and calling it:
Beta Was this translation helpful? Give feedback.
All reactions