git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added a comment syntax to guestfish (# ...).
[libguestfs.git]
/
fish
/
fish.c
diff --git
a/fish/fish.c
b/fish/fish.c
index
a5fc337
..
894e351
100644
(file)
--- 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");