Skip to main content

Questions tagged [nushell]

A flexible cross-platform shell with structured data, a programming language, clear error messages, IDE support, and its own (input) line editor "reedline".

0 votes
0 answers
17 views

Nushell progress status length and index

I am running some image transcoding tasks using taskfile and Nushell -- using Nconvert to transcode. transcode-jpegxl: #!nu let read_img_files = { ls -f **/* | where type == file | get name} do $...
Shah-G's user avatar
  • 141
2 votes
1 answer
227 views

Finding the line count of source files as a table in nushell

I'm very early in trying to learn nushell, sorry! … I'd like to build a table with all the recursively found ".swift" source files in a folder, and then append an additional column that ...
Benjohn's user avatar
  • 123
1 vote
1 answer
279 views

nushell: open excel files and search them for a text

I would like to use Nu to open several Excel files, search them for text and print the line of each match along with its location. For example: hugh file.xsls, sheet 123, line 98765: ... todo ... To ...
user194860's user avatar
1 vote
1 answer
264 views

nushell: pass list of filtered files to external program

I want Nu to find some files for me, filter them and pass them to an external program. For example: "Revert all files whose name contains 'GENERATED' with Git." I tried several variants, but ...
user194860's user avatar
4 votes
3 answers
861 views

How do I change the default location for nushell configration files

I noticed the default location for nushell's configuration files on Mac OS is ~/Library/Application Support/nushell/, is it possible to change it to another location?
Jian's user avatar
  • 181
9 votes
1 answer
940 views

How to get a list of keys from a record?

I have a record {a:1, b:2}. I would like to know how to get list of keys from it, which would return [a b] in this case.
Adrian Staniec's user avatar
3 votes
1 answer
416 views

Skipping lines in a large file, then pipe to external command in Nushell

I'm trying to write a very simple Nushell script. I want to skip the first 46 lines and pipe the rest to an external command. In Bash: zcat filename.sql.gz | tail -n +46 | mysql dbname Since ...
Hut8's user avatar
  • 235
4 votes
2 answers
2k views

What's the opposite of `/` in Command Prompt (nushell)?

Whenever I accidentally press / +Return. I end up at the root of the current drive, or C:\. Is there an opposite operation? A shortcut to last location? Anything? I'm using nushell, on Windows 10.
Mossa's user avatar
  • 151
3 votes
1 answer
1k views

nushell: Add computed column to table

How can I add a column in a table in nushell, which computes its values from other columns? For example, I would like to split the column "name" into "path without name" and "...
user194860's user avatar
5 votes
3 answers
4k views

nushell: list all files recursively

How can I list files recursively with the nu shell? More specifically: All files, folders and everything else in a specified folder and every inner folder, recursively. I tried ls **, but that does ...
user194860's user avatar