mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 10:41:13 -03:00
Add documentation for umask
darcs-hash:20051017143050-ac50b-0943033514159966b93adcb4073fa52cc8925597.gz
This commit is contained in:
21
doc_src/umask.txt
Normal file
21
doc_src/umask.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
\section umask umask - Set or get the shells resurce usage limits
|
||||
|
||||
\subsection umask-synopsis Synopsis
|
||||
<code>umask [OPTIONS] [MASK]</code>
|
||||
|
||||
\subsection umask-description Description
|
||||
|
||||
With no argument, the current file-creation mask is printed, if an
|
||||
argument is specified, it is the new file creation mask.
|
||||
|
||||
- <code>-h</code> or <code>--help</code> print this message
|
||||
- <code>-S</code> or <code>--symbolic</code> prints the file-creation mask in symbolic form instead of octal form. Use <code>man chmod</code> for more information.
|
||||
- <code>-p</code> or <code>--as-command</code> prints any output in a form that may be reused as input
|
||||
|
||||
The umask implementation in fish should behave identically to the one in bash.
|
||||
|
||||
\subsection umask-example Example
|
||||
|
||||
<code>umask 600</code> sets the file creation mask to read and write for the owner and no permissions at all for any other users.
|
||||
|
||||
@@ -896,7 +896,7 @@ function umask -d "Set default file permission mask"
|
||||
|
||||
case 0
|
||||
if not set -q umask
|
||||
set -g umask 775
|
||||
set -g umask 664
|
||||
end
|
||||
if test $as_command -eq 1
|
||||
echo umask $umask
|
||||
@@ -909,7 +909,7 @@ function umask -d "Set default file permission mask"
|
||||
end
|
||||
|
||||
case 1
|
||||
set parsed (__fish_umask_parse $opt)
|
||||
set -l parsed (__fish_umask_parse $opt)
|
||||
if test (count $parsed) -eq 1
|
||||
set -g umask $parsed
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user