list aliases and custom commands in current scope #2821
Comments
|
hello. would like to work on this one! |
|
it's yours @sousajf1. Thanks and good luck! :) |
|
@jonathandturner hello. me and @fdncred we were talking about this issue, and it seems that we indeed need to get the current scope. Question is how can we do that? How can we differentiate the current scope from the global one. |
|
@sousajf1 while waiting on JT to respond you might want to take a look at fn entry_for(scope: &Scope, name: &str, tag: Tag) -> Option<Value> {
if scope.has_custom_command(name) {
Some(create_entry!(name, "Nushell custom command", tag, false))
} else if scope.has_command(name) {
Some(create_entry!(name, "Nushell built-in command", tag, true))
} else if scope.has_alias(name) {
Some(create_entry!(name, "Nushell alias", tag, false))
} else {
None
}
} |
|
I'll try to take a look into it this weekend :) ty |
|
같이 합시다 |
|
@sousajf1 What's the status on this? @KwakGiyoung is offering to help. I don't speak Korean but that's what google translate says. :) |
|
Sorry I've been away for a bit, moving from my old apartment. @KwakGiyoung we can work on it together sure :) . maybe we can chat on discord? |
|
@sousajf1 no worries at all. just checking in. thanks! |
Is your feature request related to a problem? Please describe.
yes, when i
sourcea script file, i'd like to be able to tell if it really sourced. i ran into a problem where i was sourcing a file but it really wasn't getting sourced because i was in the wrong directory.Describe the solution you'd like
maybe something like
scope_show --aliasesandscope_show --commandsandscope_show --custom_commandsor maybe just an augmentation to thehelp commandsfunctionality likehelp commands --aliasesorhelp commands --custom. i'm not real picky but it will output a table with columns like "row number, name, description, type (alias or custom command), alias/cmd text"The text was updated successfully, but these errors were encountered: