-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_bashrc
34 lines (30 loc) · 909 Bytes
/
dot_bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Ensure GPG knows how to get to a tty
GPG_TTY=$(tty)
export GPG_TTY
# SSH/SCP alias without host-key checking
alias ssh="TERM=xterm ssh"
alias sshno="TERM=xterm ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
alias scpno='scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
# Nice shortening of a common directory listing command
alias ll="ls -la"
# Enable colors in less
alias less="less -R"
# Configure dircolors as appropriate
DIRCOLORS=$(command -v dircolors)
if [ -n "${DIRCOLORS}" ]
then
case "${TERM}" in
*-256color)
DIRCOLOR_DB="${HOME}/.config/dircolors/dircolors.256dark"
;;
*)
DIRCOLOR_DB="${HOME}/.config/dircolors/dircolors.ansi-dark"
;;
esac
if [ -f "${DIRCOLOR_DB}" ]
then
# shellcheck disable=SC2046
eval $("${DIRCOLORS}" "${DIRCOLOR_DB}")
fi
fi