From: Teemu Likonen <tlikonen@iki.fi>
To: Ted Pavlic <ted@tedpavlic.com>
Cc: "Boyd Stephen Smith Jr." <bss@iguanasuicide.net>,
Junio C Hamano <gitster@pobox.com>,
"Shawn O. Pearce" <spearce@spearce.org>,
git <git@vger.kernel.org>
Subject: Re: [PATCH] Simple update to bash completions to prevent unbound variable errors.
Date: Tue, 13 Jan 2009 08:35:56 +0200 [thread overview]
Message-ID: <87hc43emr7.fsf@iki.fi> (raw)
In-Reply-To: <496C1D90.1020609@tedpavlic.com> (Ted Pavlic's message of "Mon\, 12 Jan 2009 23\:50\:24 -0500")
Ted Pavlic (2009-01-12 23:50 -0500) wrote:
> NOTE: On my system, I save git-completion.bash to .git_bash_completion.
> Because of that, Vim can't ftdetect off of the file name. The modeline
> allows ft=sh even when you don't end in .sh or .bash.
>
> An alternative (to a Vim modeline) is to put
>
> #!bash
>
> at the top of the script. That would do the same thing as the modeline
> (even though it would never actually get used by the sourced "script").
Another way is to set filetype detection locally. This way the project
files don't get filled with editor-specific stuff. You may want add
something like the following to your ~/.vim/filetype.vim file:
augroup filetypedetect
autocmd BufNewFile,BufRead .git_bash_completion setl ft=sh
augroup END
next prev parent reply other threads:[~2009-01-13 6:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 2:44 [PATCH] Simple update to bash completions to prevent unbound variable errors Ted Pavlic
2009-01-13 3:14 ` Junio C Hamano
2009-01-13 3:56 ` Boyd Stephen Smith Jr.
2009-01-13 4:34 ` Ted Pavlic
2009-01-13 4:50 ` Ted Pavlic
2009-01-13 6:35 ` Teemu Likonen [this message]
2009-01-13 8:01 ` Junio C Hamano
2009-01-13 4:30 ` Ted Pavlic
2009-01-13 5:37 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hc43emr7.fsf@iki.fi \
--to=tlikonen@iki.fi \
--cc=bss@iguanasuicide.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
--cc=ted@tedpavlic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).