With glusterfs-cli installed, bash tab completion fails to work and prints an error message: $ gluster volgrep: Invalid range end ^C I have tested 3.6.3 and 3.7.2, both of which exhibit the problem. The problem is caused by the ordering of characters within an egrep bracket expression in the "_gluster_completion()" function defined in /etc/bash_completion.d/gluster. The file contains this line: egrep -ao --color=never "([A-Za-z0-9_-.]+)|[[:space:]]+|." | \ And egrep is interpreting the "-" character in that bracket expression as indicating a range is being requested, "_-." Fortunately, "_" actually comes after ".", this range expression is invalid, and egrep throws the error instead of silently not doing what was intended. The fix is simply to swap the positions of "-" and "." in that bracket expression: egrep -ao --color=never "([A-Za-z0-9_.-]+)|[[:space:]]+|." | \ With this change, bash tab completion works as intended.
Triaged this bug as a part of the weekly meeting. Paul, would you like to send a patch for this? The workflow is here http://www.gluster.org/community/documentation/index.php/Development_Work_Flow
REVIEW: http://review.gluster.org/11939 (Swap order of characters in egrep bracket expression to fix Bug 1243108.) posted (#1) for review on master by Anonymous Coward (paulds)
REVIEW: http://review.gluster.org/11939 (bash-completion: Swap order of characters in egrep bracket expression) posted (#2) for review on master by Niels de Vos (ndevos)
REVIEW: http://review.gluster.org/11939 (bash-completion: Swap order of characters in egrep bracket expression) posted (#3) for review on master by Niels de Vos (ndevos)
REVIEW: http://review.gluster.org/11939 (bash-completion: Swap order of characters in egrep bracket expression) posted (#4) for review on master by Vijay Bellur (vbellur)
Patch seems to have been merged, moving BZ to MODIFIED.
Was this patch actually ever merged? The latest 3.7.8 packages in the gluster.org repos still exhibit the same problem.
(In reply to Paul Stauffer from comment #7) > Was this patch actually ever merged? The latest 3.7.8 packages in the > gluster.org repos still exhibit the same problem. Just checked, the patch is present in the 'master' branch but looks like it wasn't back-ported to the release-3.7 branch. You would need to clone this bug for 3.7.9 and send the patch there too. I can do it for you if you like.
Thanks; I took a stab at it. :)
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report. glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/ [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user