mirror of
https://github.com/artizirk/dotfiles.git
synced 2024-11-22 16:30:59 +02:00
Borrow a pretty dotfiles status function
This commit is contained in:
parent
f974de970e
commit
6034ee7222
11
.zshrc
11
.zshrc
@ -30,6 +30,17 @@ function _config_deactivate {
|
|||||||
unset GIT_DIR GIT_WORK_TREE CONFIG_ENV
|
unset GIT_DIR GIT_WORK_TREE CONFIG_ENV
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function config_status {
|
||||||
|
# Borrowed from https://mitxela.com/projects/dotfiles_management
|
||||||
|
(
|
||||||
|
_config_activate
|
||||||
|
for i in $(git ls-files); do
|
||||||
|
echo -n "$(git -c color.status=always status $i -s | sed "s#$i##")"
|
||||||
|
echo -e "¬/$i¬\e[0;33m$(git -c color.ui=always log -1 --format="%s" -- $i)\e[0m"
|
||||||
|
done
|
||||||
|
) | column -t --separator=¬ -T2
|
||||||
|
}
|
||||||
|
|
||||||
function config {
|
function config {
|
||||||
if [[ -n "$1" ]]; then
|
if [[ -n "$1" ]]; then
|
||||||
_config_activate
|
_config_activate
|
||||||
|
Loading…
Reference in New Issue
Block a user