Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#48702 - Hash sign interpreted as comment when not at start of line

Attached to Project: Pacman
Opened by Cimbali (cimbali) - Saturday, 26 March 2016, 14:15 GMT
Last edited by Allan McRae (Allan) - Saturday, 14 January 2017, 07:56 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 5.0.1
Due in Version 5.1.0
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


When trying to use curl as pacman's download tool to limit download rates, I ran into the the following problem to add the '-#' option to show the download's progress bar.

Summary and Info:

Hash signs '#' can't be used in a command or value.

They are interpreted as start of a comment anywere, and I couldn't find a way to escape them.
I was under the impression that pacman.conf would use the usual convention that comments are **lines that start with #** and thus this shouldn't be a problem.

Steps to Reproduce:

1. Set the following line in pacman.conf:
XferCommand = /usr/bin/curl -C - -f -# -o %o %u

2. Run any download through pacman, e.g:
pacman -Syy

You will get the following error message, indicating that the command has been truncated at #:
curl: option -: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 14 January 2017, 07:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit 8a19c4a7