forked from tangledhelix/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtcshrc
21 lines (15 loc) · 856 Bytes
/
tcshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# A prompt that knows about git branches
alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "[git:`git rev-parse --abbrev-ref HEAD`]\n"'
alias precmd 'set prompt="\n`__git_current_branch`%n@%M:%c2%# "'
######################################################################
# Hostname tab completion for multiple commands
# Show me possible completions when there are multiple possibilities
set autolist
# Read ~/.ssh/known_hosts
set _ssh_knownhosts = `sed -e 's/^ *//' -e '/^#/d' -e 's/[, ].*//' -e '/\[/d' ~/.ssh/known_hosts | sort -u`
foreach command (ssh sftp scp sdist host dig nslookup ping telnet \
mtr traceroute cons clogin load seed for sshx sperl ping6 \
traceroute6)
complete $command 'p/1/$_ssh_knownhosts/' 'p/2/c/'
end
######################################################################