Skip to content

Idea: nushell integration in xonsh shell #52

@anki-code

Description

@anki-code

Hello! I have an idea!

Nushell has an ability to transform output into table.

In xonsh we can use pandas DataFrame or any other library that can work with the table like with object.

So using Nushell as a backend and function macro or decorator alias we can have unified use case e.g.:

def nudf(cmd):
    json_data = $(nu -c @(cmd + ' | to json'))
    df = @.imp.pandas.DataFrame(@.imp.json.loads(json_data))
    return df

files_df = nudf!(ls -la)
files_df
# DataFrame

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions