public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] report: use '$' instead of '#' for showing commands
@ 2020-11-10 15:01 Oguz Bektas
  2020-11-11 15:34 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Oguz Bektas @ 2020-11-10 15:01 UTC (permalink / raw)
  To: pbs-devel

since some files can contain '#' character for comments. (i.e.,
/etc/hosts)

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 src/server/report.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/server/report.rs b/src/server/report.rs
index 9513434f..bc2179b9 100644
--- a/src/server/report.rs
+++ b/src/server/report.rs
@@ -57,7 +57,7 @@ pub fn generate_report() -> String {
                 Ok(None) => String::from("# file does not exist"),
                 Err(err) => err.to_string(),
             };
-            format!("# cat '{}'\n{}", file_name, content)
+            format!("$ cat '{}'\n{}", file_name, content)
         })
         .collect::<Vec<String>>()
         .join("\n\n");
@@ -73,14 +73,14 @@ pub fn generate_report() -> String {
                 Ok(output) => String::from_utf8_lossy(&output.stdout).to_string(),
                 Err(err) => err.to_string(),
             };
-            format!("# `{} {}`\n{}", command, args.join(" "), output)
+            format!("$ `{} {}`\n{}", command, args.join(" "), output)
         })
         .collect::<Vec<String>>()
         .join("\n\n");
 
     let function_outputs = function_calls()
         .iter()
-        .map(|(desc, function)| format!("# {}\n{}", desc, function()))
+        .map(|(desc, function)| format!("$ {}\n{}", desc, function()))
         .collect::<Vec<String>>()
         .join("\n\n");
 
-- 
2.20.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] report: use '$' instead of '#' for showing commands
  2020-11-10 15:01 [pbs-devel] [PATCH proxmox-backup] report: use '$' instead of '#' for showing commands Oguz Bektas
@ 2020-11-11 15:34 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-11 15:34 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Oguz Bektas

On 10.11.20 16:01, Oguz Bektas wrote:
> since some files can contain '#' character for comments. (i.e.,
> /etc/hosts)
> 
> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
>  src/server/report.rs | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-11 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 15:01 [pbs-devel] [PATCH proxmox-backup] report: use '$' instead of '#' for showing commands Oguz Bektas
2020-11-11 15:34 ` [pbs-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal