summaryrefslogtreecommitdiffstats
path: root/fish
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-30 19:53:52 +0100
committerRichard Jones <rjones@redhat.com>2009-04-30 19:53:52 +0100
commitdf189925e4a0e6f80b0aebbd78201db09a63daf3 (patch)
tree9ca16fdd21aa038d62f0e52d52a810448a6247a7 /fish
parentf1c552c43607299bb32aecc1bf696bbc31f94dc8 (diff)
downloadlibguestfs-df189925e4a0e6f80b0aebbd78201db09a63daf3.tar.gz
libguestfs-df189925e4a0e6f80b0aebbd78201db09a63daf3.tar.xz
libguestfs-df189925e4a0e6f80b0aebbd78201db09a63daf3.zip
Added a comment syntax to guestfish (# ...).
Diffstat (limited to 'fish')
-rw-r--r--fish/fish.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fish/fish.c b/fish/fish.c
index a5fc337d..894e351d 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -354,6 +354,11 @@ script (int prompt)
while (*buf && isspace (*buf))
buf++;
+ if (!*buf) continue;
+
+ /* If the next character is '#' then this is a comment. */
+ if (*buf == '#') continue;
+
/* Get the command (cannot be quoted). */
len = strcspn (buf, " \t");