parted/SOURCES/0040-doc-Add-information-about-quoting.patch
2021-09-09 23:32:26 +00:00

50 lines
1.7 KiB
Diff

From fd311a9367ec342b7d1fa5265f4d2167a29de30d Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Fri, 6 Nov 2015 08:56:45 -0800
Subject: [PATCH 40/40] doc: Add information about quoting
Some shells (bash) will strip off the " so it needs to be
wrapped in '' to prevent it. eg.
parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M
(cherry picked from commit 8d5e7329a6984614ac9951f376bc77ea7f822ca3)
---
doc/C/parted.8 | 4 +++-
doc/parted.texi | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index 41baa1a..eb7cd98 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -82,7 +82,9 @@ dvh partition tables, it should be one of "primary", "logical", or "extended".
.TP
.B name \fIpartition\fP \fIname\fP
Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
-PC98, and GPT disklabels. The name can be placed in quotes, if necessary.
+PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
+And depending on the shell may need to also be wrapped in single quotes so that
+the shell doesn't strip off the double quotes.
.TP
.B print
Display the partition table.
diff --git a/doc/parted.texi b/doc/parted.texi
index c727fb2..1b9c084 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -628,7 +628,9 @@ $ @kbd{mkfs.vfat /dev/sdX2}
@deffn Command name @var{number} @var{name}
Sets the name for the partition @var{number} (GPT, Mac, MIPS and PC98 only).
-The name can be placed in quotes.
+The name can be placed in quotes. And depending on the shell may need to also
+be wrapped in single quotes so that the shell doesn't strip off the double
+quotes.
Example:
--
2.5.5