-
Notifications
You must be signed in to change notification settings - Fork 1
ansv/utils
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Adding git branch on the Bash/ZSH command prompt
------------------------------------------------
Add the following line to your .bashrc/.zshrc:
source ~/utils/git-prompt.sh
(we assume git-prompt.sh is located in ~/utils/)
Change your PS1 to call __git_ps1 as command-substitution:
Bash:
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]$(__git_ps1 " (%s)")\n\$ '
ZSH:
setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
Adding git completion for the Bash
----------------------------------
Add the following line to your .bashrc:
source ~/utils/git-completion.bash
Global git configuration
------------------------
Create symbolic link to local git.config to use it as global Git configuration:
$ ln -s ~/utils/git.config ~/.gitconfig
Git scripts source
------------------
git-completion.bash and git-prompt.sh are taken from
https://raw.githubusercontent.com/git/git/master/contrib/completion/
$ wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
$ wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
Show diff output as two windows in vimdiff
------------------------------------------
To use you can create a symbolic link to xd in /usr/local/bin:
$ ln -s ~/utils/xd /usr/local/bin/xd
Usage:
$ git diff ... |xd
$ hg diff ... |xd
$ svn diff ... |xd
$ cat some.patch |xd
You can also preprocess diff output to get more precise results:
$ git diff ... |grep -v ... |sed ... |xd
$ cat some.patch |grep -v ... |sed ... |xd
YouCompleteMe configuration for the linux kernel
------------------------------------------------
Replace "/home/pcie/ac/mld/" in the file ycm_extra_conf.py with your path to
the kernel sources. Then
$ ln -s ~/utils/ycm_extra_conf.py <your-kernel-source-root>/.ycm_extra_conf.py
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published