-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(maint) only check builtin_command?
for posix
#2518
base: main
Are you sure you want to change the base?
(maint) only check builtin_command?
for posix
#2518
Conversation
The `builtin_command?` only is useful in posix, where the `type` function is defined. Windows Powershell does not have `type` defined.
39815b8
to
8075009
Compare
output.chomp =~ /builtin/ ? true : false | ||
# optional function to be defined in subclass if necessary | ||
def builtin_command?(_command_) | ||
nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe keep false
for consistency? Also the "Ruby way" for unused variable is to name them _variable
.
Overall LGTM.
@tvpartytonight is this still needed? If so, I agree with @smortex's comments. |
Coming back to this, is this still needed? It looks like PowerShell can query if a command is a function like https://superuser.com/questions/1648302/powershell-equivalent-of-unix-shell-buitin-type But I'm not sure that'd be useful here? |
The
builtin_command?
only is useful in posix, where thetype
function is defined. Windows Powershell does not have
type
defined.