Giter Site home page Giter Site logo

Can't run umask about nushell HOT 10 CLOSED

Schweber avatar Schweber commented on June 8, 2024
Can't run umask

from nushell.

Comments (10)

Schweber avatar Schweber commented on June 8, 2024 1

Sorry, i just now understood your posts. I thought that umask is a coreutil or something like that. Thank you for pointing that out.

from nushell.

fdncred avatar fdncred commented on June 8, 2024

It's apparently not in your path. I just ran it on macos and it works fine.

from nushell.

nibon7 avatar nibon7 commented on June 8, 2024

umask is normally a built-in command provided by shell in linux

https://github.com/bminor/bash/blob/master/builtins/umask.def
https://git.busybox.net/busybox/tree/shell/ash.c#n14336

from nushell.

fdncred avatar fdncred commented on June 8, 2024

if it's built into the shell binary, i could see how that would be a problem. you'd probably have to do bash -c umask maybe?

On MacOS, it's separate.

❯ which umask 
╭─#─┬command┬──────path──────┬───type───╮
│ 0 │ umask │ /usr/bin/umask │ external │
╰───┴───────┴────────────────┴──────────╯

from nushell.

Schweber avatar Schweber commented on June 8, 2024

I guess it's related to Nixos. I've asked in the help forum there but haven't gotten an answer yet.

The strange thing is, that which umask fails in bash as well but i can still run umask in bash.

from nushell.

fdncred avatar fdncred commented on June 8, 2024

The strange thing is, that which umask fails in bash as well but i can still run umask in bash.

This is because it's a built-in command like nibon7 said. In this context, built-in means all the code for it is built into the bash binary so it is not an external executable. This is why I said to try bash -c umask to see if you get a result. As long as bash is in your path, it should work.

from nushell.

nibon7 avatar nibon7 commented on June 8, 2024

I guess it's related to Nixos. I've asked in the help forum there but haven't gotten an answer yet.

The strange thing is, that which umask fails in bash as well but i can still run umask in bash.

Seems like gnu which doesn't list built-in command, and you can use bash -c help to get built-in shell command list.

from nushell.

liff avatar liff commented on June 8, 2024

It would be useful to have a umask command, though. Could/should this issue be considered a feature request?

from nushell.

fdncred avatar fdncred commented on June 8, 2024

never used the command myself. it's also not in the uutils/coreutils crates.

from nushell.

liff avatar liff commented on June 8, 2024

Probably the reason it isn’t in coreutils is that it cannot be implemented as an external command for the same reason as cd: it modifies the state of the running process. At least that’s the way it’s on Linux. No idea what /usr/bin/umask does on macOS 😅

from nushell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.