New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umask symbolic modes are buggy #738

Closed
zanchey opened this Issue May 12, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@zanchey
Member

zanchey commented May 12, 2013

A quick note, and one that should be relatively easy to fix post fish-2.0.

Symbolic modes in umask are buggy. Using + or - in a mode causes a syntax error (because of an array dereference of a non-array variable). Even having fixed this in my local branch, the + or - options do not actually appear to alter the umask in any appreciable way. They make the umask documentation quite confusing too.

@krader1961 krader1961 added the bug label Mar 18, 2017

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Mar 18, 2017

Contributor

OMFG! This is done via a fish variable set by a umask function rather than a builtin command. Setting the variable causes magic C++ code to be run. Which means that changing the behavior is problematic since it should probably only be done in a major release if doing so involves turning the implementation into a builtin.

Note that echo $umask "works" in fish but produces no output in bash.

Contributor

krader1961 commented Mar 18, 2017

OMFG! This is done via a fish variable set by a umask function rather than a builtin command. Setting the variable causes magic C++ code to be run. Which means that changing the behavior is problematic since it should probably only be done in a major release if doing so involves turning the implementation into a builtin.

Note that echo $umask "works" in fish but produces no output in bash.

@krader1961 krader1961 self-assigned this Mar 26, 2017

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Mar 26, 2017

Contributor

In addition to the other problems with the umask function it depends on the perl command. Obviously that is not a good idea. If we can't do it with the available fish functionality we should at least be using Python since that is already a hard dependency and Perl is not.

Contributor

krader1961 commented Mar 26, 2017

In addition to the other problems with the umask function it depends on the perl command. Obviously that is not a good idea. If we can't do it with the available fish functionality we should at least be using Python since that is already a hard dependency and Perl is not.

krader1961 added a commit to krader1961/fish-shell that referenced this issue Mar 28, 2017

@krader1961 krader1961 modified the milestones: 2.6.0, fish-future Mar 28, 2017

develop7 added a commit to develop7/fish-shell that referenced this issue Apr 17, 2017

fix `umask` handling of symbolic modes
This fixes the handling of symbolic umask values. It also removes two
invocations of `perl` and all but two `math` commands.

Fixes #738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment