Removed dots command
This commit is contained in:
parent
aca4f1d814
commit
37f663c57d
18
init.zsh
18
init.zsh
@ -127,24 +127,6 @@ alias gu="git pull"
|
||||
alias gf="git fetch"
|
||||
alias gt="git status"
|
||||
|
||||
# Dotfile management
|
||||
[ -v ZSH_MANAGE_DOTFILES_REPO ] || ZSH_MANAGE_DOTFILES_REPO="${HOME}/src/dotfiles"
|
||||
function dots {
|
||||
local args=("--git-dir=${ZSH_MANAGE_DOTFILES_REPO}" '--work-tree=/' '--bare')
|
||||
if (( ${#} == 0 )); then
|
||||
(cd /
|
||||
for file in $(git ${args} ls-files); do
|
||||
printf '%s\t%s\t\e[38;2;255;255;0m%s\e[m\n' \
|
||||
"$(git ${args} -c color.status=always status -s "${file}" | sed "s#${file}##")" \
|
||||
"/${file}" \
|
||||
"$(git ${args} log --max-count=1 --format='%s' "${file}")"
|
||||
done) | column -t -T2 --separator=" "
|
||||
else
|
||||
git ${args} "${@}"
|
||||
fi
|
||||
}
|
||||
compdef -e "words[1]=(git '--git-dir=${HOME}/src/dotfiles' --work-tree=/ --bare); service=git; (( CURRENT+=3 )); _git" dots
|
||||
|
||||
# Sudo last line with <Esc><Esc>
|
||||
sudo-command-line() {
|
||||
[[ -z $BUFFER ]] && zle up-history
|
||||
|
Loading…
Reference in New Issue
Block a user