Questions tagged [nushell]

For programming/scripting questions regarding Nushell (a.k.a. "nu"), a shell available for Linux, Unix, and Windows operating systems. Interactive, general-use shell questions are typically better suited for the Super User or Unix & Linux sites, but (as always) please review their on-topic guidance and check for duplicates before posting.

21 questions
0
votes
3 answers

how to redirect stdout to a file in NuShell?

how to redirect some command output to a file in NuShell? In zsh/bash we can redirect output of ls command to a file as below ls > fileList.txt how can we do the same in NuShell?
Robert Ranjan
  • 1,538
  • 3
  • 19
  • 17
0
votes
1 answer

Colored text to the console

How can I echo colored text to the console? In Powershell I can do this: write-host _info_ -fore Yellow -Back Blue write-host _error_ -fore Yellow -Back Red write-host _warning_ -fore White -Back DarkYellow write-host _succes_ -fore Yellow …
0
votes
1 answer

get-credential/export-clixml/import-clixml equivalents in nushell

I frequently use in powershell this command to store credentials (user and password) in a secure way (password encrypted): get-credential | export-clixml mycredentials.xml and to recover my credentials, I can use: $cred=import-clixml…
0
votes
1 answer

Why does using a variable as a function parameter cause a type mismatch error in a later function call?

def make-list [val?: string] { ["f1" "f2"] } def use-list [list: list] { $list | each { |it| $it + "!" } } let $val = "abc" let $l = (make-list $val) use-list $l In this code, I have two functions, one to make a list, and another to…
gunr2171
  • 16,104
  • 25
  • 61
  • 88
0
votes
1 answer

How do you make the nushell prompt text not wrap?

I have just started experimenting with NuShell, and I am wondering how to fix this issue. With my prompt config set as prompt = "build-string (ansi y) (date format '%I:%M:%S') (ansi reset) ' ' (ansi g) (whoami) '@' (hostname) (ansi reset) ' ' (ansi…
nph
  • 83
  • 5
-1
votes
0 answers

Clang can't find .o files when linking in nushell compilation script

I am currently trying to write a build script for a c++ project in Nushell. It's a fairly simple setup, with a library that is built first and then and exe that is build in an other script and linked agaisnt the library. My problem is more obvious…
TOOL
  • 70
  • 1
  • 10
1
2