1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 23:04:22 +00:00

Create dotfish function

This commit is contained in:
Steffo 2021-07-15 02:22:16 +02:00
parent ff9b154b27
commit 59a31fa7ab
Signed by: steffo
GPG key ID: 6965406171929D01
3 changed files with 28 additions and 0 deletions

18
functions/dotfish.fish Normal file
View file

@ -0,0 +1,18 @@
function dotfish
if test (count $argv) -ge 1
set -g TARGET $argv[1]
else
set -g TARGET (whoami)
end
echo_progress "Updating fish config for: "
echo_highlight "$TARGET" \n
echo_progress "Pulling from Git..." \n
git -C ~(echo $TARGET)/.config/fish pull
echo_progress "Fixing permissions..." \n
chown -R "$TARGET:" ~(echo $TARGET)
echo_progress "Update complete!"
end

View file

@ -0,0 +1,5 @@
function echo_highlight
set_color yellow
echo -n $argv
set_color normal
end

View file

@ -0,0 +1,5 @@
function echo_progress
set_color yellow --dim
echo -n $argv
set_color normal
end