<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>Thanks for working on this. A couple of procedural notes:<br>
</p>
<p> 1. This is a patch for Clang, not LLVM itself, and cfe-commits,
not llvm-commits, is the appropriate list cc on the reviews.<br>
</p>
<p> 2. Please don't use the tag [GSoC] on patches. The [] tags
should be topical. There have been multiple GSoC projects over
multiple years. For example, [bash-autocomplete] would be good. I
expect conversations tagged with [GSoC] to be about the LLVM
community's participation in GSoC or GSoC project proposals.<br>
</p>
-Hal<br>
<br>
<div class="moz-cite-prefix">On 06/24/2017 08:55 AM, Yuka Takahashi
via Phabricator via llvm-commits wrote:<br>
</div>
<blockquote
cite="mid:differential-rev-PHID-DREV-vdj5je6itbkigmu4ufe5-req@reviews.llvm.org"
type="cite">
<pre wrap="">yamaguchi created this revision.
This is patch for bash completion for clang project.
We don't need `=` when completing options like "-stdlib=".
<a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D34594">https://reviews.llvm.org/D34594</a>
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-autocomplete.sh
===================================================================
--- clang/utils/bash-autocomplete.sh
+++ clang/utils/bash-autocomplete.sh
@@ -1,7 +1,7 @@
# Please add "source /path/to/bash-autocomplete.sh" to your .bashrc to use this.
_clang()
{
- local cur prev words cword arg
+ local cur prev words cword arg=""
_init_completion -n : || return
# bash always separates '=' as a token even if there's no space before/after '='.
@@ -22,16 +22,17 @@
elif [[ "$w2" == -* && "$w1" == '=' ]]; then
# -foo=bar<tab>
arg="$w2=,$cur"
- else
- _filedir
fi
local flags=$( clang --autocomplete="$arg" )
- if [[ "$cur" == "=" ]]; then
+ if [[ "$cur" == '=' ]]; then
COMPREPLY=( $( compgen -W "$flags" -- "") )
- elif [[ "$flags" == "" ]]; then
+ elif [[ "$flags" == "" || "$arg" == "" ]]; then
_filedir
else
+ if [[ ${flags: -1} == '=' ]]; then
+ compopt -o nospace
+ fi
COMPREPLY=( $( compgen -W "$flags" -- "$cur" ) )
fi
}
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>