Tab completion for dotfiles
This commit is contained in:
@@ -22,6 +22,15 @@ alias dvim="GIT_WORK_TREE='/home/kuba' GIT_DIR='/home/kuba/.dotfiles.git/' vim"
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
# Make tab-completion work for dotfiles exactly as for git
|
||||
# First we need to load the completion for git (this is done the first time
|
||||
# one types `git <TAB>` in the console).
|
||||
_completion_loader git
|
||||
# Running `complete -p git` yields the following
|
||||
# complete -o bashdefault -o default -o nospace -F __git_wrap__git_main git
|
||||
# So we do
|
||||
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main dotfiles
|
||||
|
||||
# Define a OS X-like open command
|
||||
open() { command xdg-open "$@" > /dev/null 2>&1 & }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user