summaryrefslogtreecommitdiffstats
path: root/fish
diff options
context:
space:
mode:
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");