Skip to content

Instantly share code, notes, and snippets.

@sambatyon
Last active August 29, 2015 13:57
Show Gist options
  • Save sambatyon/9384049 to your computer and use it in GitHub Desktop.
Save sambatyon/9384049 to your computer and use it in GitHub Desktop.
msys configuration files with git support
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \$ '
#\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033m\w$(__git_ps1)\033[0m\] $
# If not running interactively don't do anything
case $- in
*i*) ;;
*) return;;
esac
export TERM=msys
# Download at http://bash-completion.alioth.debian.org/files/
# use version 1.3 for mingw and use --prefix in the configure
# It is slow on windows, in that case, deactivate
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# Found in msys git/etc
. ~/git-completion.bash
[ -r ~/git-prompt.sh ] && . ~/git-prompt.sh
# set default options for 'less'
export LESS=-FRSX
export LESSCHARSET=utf-8
# set default protocol for 'plink'
export PLINK_PROTOCOL=ssh
if [ -n "$PS1" ]; then
alias ls='ls -C --color=auto'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
else
alias ls='ls -C'
fi
#alias ls='ls -C'
alias ll='ls -lh'
alias la='ls -Alh'
alias lx='ls -lXB' # sort by extension
alias lk='ls -lSr' # sort by size, biggest last
alias lc='ls -ltcr' # sort by and show change time, most recent last
alias lu='ls -ltur' # sort by and show access time, most recent last
alias lt='ls -ltr' # sort by date, most recent last
alias lm='ls -al | less' # pipe through 'more'
alias lr='ls -lR' # recursive ls
alias tree='tree -Csu' # nice alternative to 'recursive ls'
alias python-2.7='/d/opt/Python27/python.exe'
alias python-3.3='/c/opt/Python33/python.exe'
alias emacs='emacs --no-splash'
alias more='less'
if [ -n "$PS1" ]; then
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\[\e[36m\]$(__git_ps1 " (%s) ")\[\e[0m\]\$ '
fi
# set default options for 'less'
export LESS=-FRSX
export LESSCHARSET=utf-8
# set default protocol for 'plink'
export PLINK_PROTOCOL=sshs
# set default options for 'less'
export LESS=-FRSX
export LESSCHARSET=utf-8
# set default protocol for 'plink'
export PLINK_PROTOCOL=sshs
# Key-bindings for the command-line editor.
# Ask before displaying >50 items
# Since $WINDIR $PATH var can be in $PATH, this could list
# all window exectables in C:\WINDOWS
set completion-query-items 50
# Ignore case for the command-line-completion functionality
# on: default to a Windows style console
# off: default to a *nix style console
set completion-ignore-case on
# none, visible or audible
set bell-style none
# disable/enable 8bit input
set meta-flag on
set input-meta on
set output-meta off
set convert-meta on
# visible-stats
# Append a mark according to the file type in a listing
set visible-stats off
set mark-directories on
# Show all instead of beeping first
set show-all-if-ambiguous off
"\e[3~": delete-char
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[1;3D": backward-word
"\e[1;3C": forward-word
# MSYSTEM is emacs based
$if mode=emacs
# Common to Console & RXVT
"\C-?": backward-kill-line # Ctrl-BackSpace
"\e[2~": paste-from-clipboard # "Ins. Key"
"\e[5~": history-search-backward # Page up
"\e[6~": history-search-forward # Page down
$if term=msys # RXVT
"\e[7~": beginning-of-line # Home Key
"\e[8~": end-of-line # End Key
"\e[11~": display-shell-version # F1
"\e[15~": re-read-init-file # F5
$endif
$if term=cygwin # Console
"\e[1~": beginning-of-line # Home Key
"\e[4~": end-of-line # End Key
$endif
$endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment