Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add inputrc, bash_profile and modify profile to use these.
Browse files Browse the repository at this point in the history
Kills the annoying bell, and handles keys better.
(Might even help with Johannes' problem with RXVT)

Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
  • Loading branch information
Marius Storm-Olsen authored and Dimagog committed Aug 10, 2007
1 parent 0daae08 commit ed01c26
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 5 deletions.
7 changes: 7 additions & 0 deletions etc/bash_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Some good standards, which are not used if the user
# creates his/her own .bashrc/.bash_profile

eval `dircolors -b`
alias less='less -r'
alias ls='ls -F --color'
alias ll='ls -l'
61 changes: 61 additions & 0 deletions etc/inputrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# none, visible or audible
set bell-style visible

# Ask before displaying >40 items
# Since $WINDIR $PATH var can be in $PATH, this could list
# all window executables in C:\WINDOWS
set completion-query-items 40

# Ignore case for the command-line-completion functionality
# on: default on a Windows style console
# off: default on a *nix style console
set completion-ignore-case on

# 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

# 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~": beginning-of-history # Page up
"\e[6~": end-of-history # 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
"\e[12~": "Function Key 2"
"\e[13~": "Function Key 3"
"\e[14~": "Function Key 4"
"\e[17~": "Function Key 6"
"\e[18~": "Function Key 7"
"\e[19~": "Function Key 8"
"\e[20~": "Function Key 9"
"\e[21~": "Function Key 10"
$else
# Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo
# $if term=cygwin # Console
"\e[1~": beginning-of-line # Home Key
"\e[4~": end-of-line # End Key
"\e[17~": "Function Key 6"
"\e[18~": "Function Key 7"
"\e[19~": "Function Key 8"
"\e[20~": "Function Key 9"
"\e[21~": "Function Key 10"
"\e[23~": "Function Key 11"
$endif
$endif
19 changes: 14 additions & 5 deletions etc/profile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2001, 2002 Earnie Boyd <earnie@users.sf.net>
# This file is part of the Minimal SYStem.
# http://www.mingw.org/msys.shtml
#
#
# File: profile
# Description: Shell environment initialization script
# Last Revised: 2002.05.04
Expand Down Expand Up @@ -44,6 +44,12 @@ if [ "x$HISTFILE" == "x/.bash_history" ]; then
HISTFILE=$HOME/.bash_history
fi

if [ -e ~/.inputrc ]; then
export INPUTRC=~/.inputrc
else
export INPUTRC=/etc/inputrc
fi

export HOME LOGNAME MSYSTEM HISTFILE

for i in /etc/profile.d/*.sh ; do
Expand All @@ -59,12 +65,15 @@ $ '

alias clear=clsb

cd "$HOME"

test -e .bash_profile && . .bash_profile
if [ -e ~/.bashrc ]; then
. ~/.bashrc
elif [ -e ~/.bash_profile ]; then
. ~/.bash_profile
elif [ -e /etc/bash_profile ]; then
. /etc/bash_profile
fi

# Git specific stuff

test -e /bin/git.exe || {
echo "Setting up git"

Expand Down

0 comments on commit ed01c26

Please sign in to comment.