xref: /freebsd/bin/sh/dot.shrc (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
160315f8fSEdward Tomasz Napierala#
260315f8fSEdward Tomasz Napierala# .shrc - bourne shell startup file
360315f8fSEdward Tomasz Napierala#
460315f8fSEdward Tomasz Napierala# This file will be used if the shell is invoked for interactive use and
560315f8fSEdward Tomasz Napierala# the environment variable ENV is set to this file.
660315f8fSEdward Tomasz Napierala#
760315f8fSEdward Tomasz Napierala# see also sh(1), environ(7).
860315f8fSEdward Tomasz Napierala#
960315f8fSEdward Tomasz Napierala
1060315f8fSEdward Tomasz Napierala
1160315f8fSEdward Tomasz Napierala# file permissions: rwxr-xr-x
1260315f8fSEdward Tomasz Napierala#
1360315f8fSEdward Tomasz Napierala# umask	022
1460315f8fSEdward Tomasz Napierala
1560315f8fSEdward Tomasz Napierala# Uncomment this to enable the builtin vi(1) command line editor in sh(1),
1660315f8fSEdward Tomasz Napierala# e.g. ESC to go into visual mode.
1760315f8fSEdward Tomasz Napierala# set -o vi
1860315f8fSEdward Tomasz Napierala
1960315f8fSEdward Tomasz Napierala
20719fd9fbSEdward Tomasz Napierala# # some useful aliases
21719fd9fbSEdward Tomasz Napierala# alias h='fc -l'
22719fd9fbSEdward Tomasz Napierala# alias j=jobs
23719fd9fbSEdward Tomasz Napierala# alias m="$PAGER"
24719fd9fbSEdward Tomasz Napierala# alias ll='ls -laFo'
25719fd9fbSEdward Tomasz Napierala# alias l='ls -l'
26719fd9fbSEdward Tomasz Napierala# alias g='egrep -i'
2760315f8fSEdward Tomasz Napierala
2860315f8fSEdward Tomasz Napierala# # be paranoid
2960315f8fSEdward Tomasz Napierala# alias cp='cp -ip'
3060315f8fSEdward Tomasz Napierala# alias mv='mv -i'
3160315f8fSEdward Tomasz Napierala# alias rm='rm -i'
3260315f8fSEdward Tomasz Napierala
33ef0d94a3SBaptiste Daroussin# # csh like history on arrow up and down
34ef0d94a3SBaptiste Daroussinbind ^[[A ed-search-prev-history
35ef0d94a3SBaptiste Daroussinbind ^[[B ed-search-next-history
36ef0d94a3SBaptiste Daroussin
37ef0d94a3SBaptiste Daroussin# # ctrl+arrow allow to jump from words to words
38ef0d94a3SBaptiste Daroussinbind "\\e[1;5C" em-next-word
39ef0d94a3SBaptiste Daroussinbind "\\e[1;5D" ed-prev-word
40ef0d94a3SBaptiste Daroussinalias history='fc -l'
41ef0d94a3SBaptiste Daroussin
42*f3aad18dSBaptiste Daroussin# Fix home/del for mobaxterm
43*f3aad18dSBaptiste Daroussinbind ^[[5~ ed-move-to-beg
44*f3aad18dSBaptiste Daroussinbind ^[[6~ ed-move-to-end
45*f3aad18dSBaptiste Daroussin
46dcef4f65SKyle Evans# read(2) of directories may not be desirable by default, as this will provoke
47dcef4f65SKyle Evans# EISDIR errors from each directory encountered.
48dcef4f65SKyle Evans# alias grep='grep -d skip'
4960315f8fSEdward Tomasz Napierala
5060315f8fSEdward Tomasz Napierala# set prompt: ``username@hostname:directory $ ''
5160315f8fSEdward Tomasz NapieralaPS1="\u@\h:\w \\$ "
5260315f8fSEdward Tomasz Napierala
5360315f8fSEdward Tomasz Napierala# search path for cd(1)
5460315f8fSEdward Tomasz Napierala# CDPATH=:$HOME
55