Add a line to
source
it in ~/.bashrc
first, and then collect similar rc files into directories respectively.If a bunch of bash completions were put inside
~/.bash_completion/
, like ~/.bash_completionjust one more line
|-- hg
|-- git
| |-- git
| |-- gitk
| `-- git-common
`-- svk
load $HOME/.bash_completionwould load whole completions.
You may also have many aliases, environment variables, function definitions for different OS like this
~/.bashrc.d
|-- linux
| |-- aliases
| |-- env
| `-- functions
|-- freebsd
| |-- aliases
| |-- env
| `-- functions
`-- darwin
|-- aliases
|-- env
`-- functions
Just one another line
load "$HOME/.bashrc.d/$(lower $(uname))"can load correct system-specified rc files.
No comments:
Post a Comment