CentOS に、git-completion.bash git-prompt.sh をいれて、
プロンプトに、git の情報でてくるようにしたいのです。
ubuntu では、簡単に設定できたのですが、CentOS で少し手間がかかり
手動でいれています。
ansible で簡単に入る方法はないでしょうか?
git には該当するシェルスクリプトがあるのですが、version 番号がついた
ディレクトリの下にあり、bash の場合ですが、ansible のスクリプトに
バージョンを教える必要があります。
tcsh は、バージョンなしのディレクトリの下にあるので、簡単です。
まずは、ansible で、このバージョン番号つきのシェアルスクリプトを、
コピーして、パスのとおっているところにおきたいのですが、どうするのが
簡単でしょうか?
/usr/share/doc/git-1.8.3.1/contrib/completion /usr/share/doc/git-1.8.3.1/contrib/completion/git-completion.bash /usr/share/doc/git-1.8.3.1/contrib/completion/git-completion.tcsh /usr/share/doc/git-1.8.3.1/contrib/completion/git-completion.zsh /usr/share/doc/git-1.8.3.1/contrib/completion/git-prompt.sh /usr/share/git-core/contrib/completion /usr/share/git-core/contrib/completion/git-completion.tcsh /usr/share/git-core/contrib/completion/git-prompt.sh
Ubuntu バージョンの設定情報ないし 途中までの CentOS 用の設定情報は質問欄に追記可能ですか?
ubuntu は、/etc/bash_completion.d/git-prompt の設定が自動的になされます。特に作業をしなくても大丈夫です。
CentOS も、tcsh なら追加設定不要です。
bash の面倒を見てくれていないだけです。
bash でもansible にバージョンの変数を動的に与えて、その変数にしたがって、
ファイルコピーしてあげるだけです。ansible 実行中のバージョン番号が
取得可能で、それが変数として使えるなら、簡単に対応できます。
I dont know anything bout the ansible. But I guess it is a clue that you may use with it, I mean, how about if you get the git version number and apply your scripts(?) of the ansible like "`git --version | sed -e 's/^git version //'`" as some software do.
あなたの回答
tips
プレビュー