Output almost all available columns. The columns that require *--poll* are not included.
*-P*, *--pairs*::
-Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>). The key (variable name) will be modified to contain only characters allowed for a shell variable identifiers, for example, FS_OPTIONS and USE_PCT instead of FS-OPTIONS and USE%.
+Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>). See also option *--shell*.
*-p*, *--poll*[_=list_]::
Monitor changes in the _/proc/self/mountinfo_ file. Supported actions are: mount, umount, remount and move. More than one action may be specified in a comma-separated list. All actions are monitored by default.
*--vfs-all*::
When used with *VFS-OPTIONS* column, print all VFS (fs-independent) flags. This option is designed for auditing purposes to list also default VFS kernel mount options which are normally not listed.
+*-y*, *--shell*::
+The column name will be modified to contain only characters allowed for shell variable identifiers. This is usable, for example, with *--pairs*. Note that this feature has been automatically enabled for *--pairs* in version 2.37, but due to compatibility issues, now it's necessary to request this behavior by *--shell*.
+
include::man-common/help-version.adoc[]
== EXIT STATUS
fputs(_(" -U, --uniq ignore filesystems with duplicate target\n"), out);
fputs(_(" -u, --notruncate don't truncate text in columns\n"), out);
fputs(_(" -v, --nofsroot don't print [/dir] for bind or btrfs mounts\n"), out);
+ fputs(_(" -y, --shell use column names to be usable as shell variable identifiers\n"), out);
fputc('\n', out);
fputs(_(" -x, --verify verify mount table content (default is fstab)\n"), out);
{ "uniq", no_argument, NULL, 'U' },
{ "verify", no_argument, NULL, 'x' },
{ "version", no_argument, NULL, 'V' },
+ { "shell", no_argument, NULL, 'y' },
{ "verbose", no_argument, NULL, FINDMNT_OPT_VERBOSE },
{ "tree", no_argument, NULL, FINDMNT_OPT_TREE },
{ "real", no_argument, NULL, FINDMNT_OPT_REAL },
flags |= FL_TREE;
while ((c = getopt_long(argc, argv,
- "AabCcDd:ehiJfF:o:O:p::PklmM:nN:rst:uvRS:T:Uw:Vx",
+ "AabCcDd:ehiJfF:o:O:p::PklmM:nN:rst:uvRS:T:Uw:Vxy",
longopts, NULL)) != -1) {
err_exclusive_options(c, longopts, excl, excl_st);
case 'x':
verify = 1;
break;
+ case 'y':
+ flags |= FL_SHELLVAR;
+ break;
case FINDMNT_OPT_VERBOSE:
flags |= FL_VERBOSE;
break;
}
scols_table_enable_raw(table, !!(flags & FL_RAW));
scols_table_enable_export(table, !!(flags & FL_EXPORT));
+ scols_table_enable_shellvar(table, !!(flags & FL_SHELLVAR));
scols_table_enable_json(table, !!(flags & FL_JSON));
scols_table_enable_ascii(table, !!(flags & FL_ASCII));
scols_table_enable_noheadings(table, !!(flags & FL_NOHEADINGS));