-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of /p/tcsh/tcsh
- Loading branch information
Showing
9 changed files
with
271 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# ~/.login - Setup user login shell environment | ||
# | ||
# See also tcsh(1), environ(7). | ||
# | ||
|
||
setenv EDITOR vi | ||
setenv PAGER less | ||
|
||
# umask 077 | ||
|
||
# set path=( ~/.local/bin $path:q ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# | ||
# ~/.tcshrc - Setup user shell environment | ||
# | ||
# See also tcsh(1), environ(7). | ||
# | ||
|
||
unalias * | ||
|
||
alias h 'history \!* 20' | ||
alias j 'jobs -l' | ||
alias ll 'ls -lAF' | ||
alias md mkdir | ||
alias rd rmdir | ||
|
||
# | ||
# The following commands are only for interactive shells. | ||
# | ||
|
||
if ( $?prompt ) then | ||
set \ | ||
autocorrect \ | ||
autoexpand \ | ||
autolist=ambiguous \ | ||
correct=cmd \ | ||
ellipsis \ | ||
filec \ | ||
history=1000 \ | ||
killdup=erase \ | ||
listjobs=long \ | ||
listlinks \ | ||
listmax=100 \ | ||
nobeep \ | ||
prompt='%N@%m:%B%c02%b%# ' \ | ||
rmstar \ | ||
savehist=(1000 merge) \ | ||
|
||
unset promptchars | ||
|
||
if ( $?tcsh ) then | ||
bindkey -e | ||
|
||
bindkey " " magic-space | ||
bindkey ^W backward-delete-word | ||
bindkey ^Z run-fg-editor | ||
bindkey ^[^W kill-region | ||
|
||
# | ||
# Setup $hosts from ~/.hosts, ~/.rhosts, ~/.ssh/known_hosts | ||
# | ||
|
||
if ( ! $?hosts ) then | ||
set hosts=() | ||
foreach f ( ~/.{,r,ssh/known_}hosts ) | ||
if ( -r "$f" ) then | ||
set hosts=( \ | ||
$hosts \ | ||
`sed \ | ||
-e 's/#.*//' \ | ||
-e '/^|/d' \ | ||
-e '/^[+-]@/d' \ | ||
-e 's/^[+-]//' \ | ||
-e 's/[[:space:]].*$//' \ | ||
-e 's/,/\n/g' \ | ||
"$f" \ | ||
| sed \ | ||
-e 's/:[[:digit:]]*$//' \ | ||
-e 's/^\[\([^]]*\)\]$/\1/' \ | ||
-e '/^[.:[:xdigit:][:space:]]*$/d' \ | ||
` \ | ||
) | ||
endif | ||
end | ||
unset f | ||
endif | ||
|
||
uncomplete * | ||
|
||
# | ||
# Copy from complete.tcsh | ||
# | ||
if ( -r ~/.complete ) source ~/.complete | ||
|
||
uncomplete rcp rsh | ||
endif | ||
|
||
# | ||
# Set status to ^G in order to keep using ^T for transpose-char. | ||
# | ||
|
||
switch ( "$OSTYPE" ) | ||
case bsd44: | ||
case darwin: | ||
case FreeBSD: | ||
case NetBSD: | ||
stty status ^G | ||
if ( $?tcsh ) bindkey ^G stuff-char | ||
breaksw | ||
endsw | ||
|
||
# | ||
# We don't want to create a root-owned files in our home. | ||
# | ||
|
||
if ( $uid == 0 ) then | ||
unset savehist | ||
setenv LESSHISTFILE - | ||
setenv VIMINIT ':set viminfo=' | ||
endif | ||
|
||
endif |