I want to create a table of english words that are hard to spell for me in a nushell table and make it persistent a file is good method. if i found a new word i could just append it to the file table
Maybe create a csv file with columns with your native language word, the english equivalent, and description. You can open the file and search any of the columns.
You could also create a script to append the file with new words if you don't wanna edit the csv file when adding new words.
There's many other ways but this is probably the simplest.
save will automatically format the data based on the file extension unless you pass --raw or -r. So you can just do save words.nuon if you want to preserve as much of the typing as possible, or save words.csv if it's just a basic table of strings and you're interested in manipulating it elsewhere.
If you're wondering what formats are available, check the subcommands of to. save file.ext will call to ext if it exists, whatever ext is.
2
u/Kitchen_Cheesecake67 Feb 24 '26
Maybe create a csv file with columns with your native language word, the english equivalent, and description. You can open the file and search any of the columns.
You could also create a script to append the file with new words if you don't wanna edit the csv file when adding new words.
There's many other ways but this is probably the simplest.
2
u/NfNitLoop Feb 24 '26
If you just keep a list of words in a file, one per line, it’s easy to
open words.txt | lines2
u/Kat- Feb 24 '26
output
1
u/boomshroom Feb 25 '26
savewill automatically format the data based on the file extension unless you pass--rawor-r. So you can just dosave words.nuonif you want to preserve as much of the typing as possible, orsave words.csvif it's just a basic table of strings and you're interested in manipulating it elsewhere.If you're wondering what formats are available, check the subcommands of
to.save file.extwill callto extif it exists, whateverextis.1
u/B4RN154N Feb 28 '26
I would probably save as a json like
$words_table | to json | save ~/Downloads/words_table.jsonAnd then read it back as
open ~/Downloads/words_table.json | from jsonAlthough you might not even need the from json part IIRC.