Fixed bash aliases - Commit 0e487faa - server-dots
-
-
Micah Halter
committed 5 years ago
1 | 1 | | #!/bin/bash |
2 | 2 | | |
3 | | - | # default applications |
4 | | - | alias -s c=nvim |
5 | | - | alias -s cpp=nvim |
6 | | - | alias -s java=nvim |
7 | | - | alias -s md=nvim |
8 | | - | alias -s tex=nvim |
9 | | - | alias -s log="less -MN" |
10 | | - | |
11 | 3 | | # aliases for Tmux |
12 | | - | alias tmux='tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf -2' |
| 4 | + | tmux() { |
| 5 | + | tconf="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" |
| 6 | + | if [ -e "$tconf" ]; then |
| 7 | + | tmux -f "$tconf" -2 "$@" |
| 8 | + | else |
| 9 | + | tmux -2 "$@" |
| 10 | + | fi |
| 11 | + | } |
13 | 12 | | alias ta='tmux attach -t' |
14 | 13 | | alias tnew='tmux new -s' |
15 | 14 | | alias tls='tmux ls' |
| skipped 119 lines |
| skipped 14 lines |
15 | 15 | | . /etc/bash_completion |
16 | 16 | | fi |
17 | 17 | | |
| 18 | + | [ -f ~/.bash_aliases ] && source ~/.bash_aliases |
| 19 | + | |
18 | 20 | | # disable bell |
19 | 21 | | if [[ $iatest > 0 ]]; then bind "set bell-style visible"; fi |
20 | 22 | | |
| skipped 51 lines |
Page is in error, reload to recover