mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 14:54:23 +00:00
Create dotfish function
This commit is contained in:
parent
ff9b154b27
commit
59a31fa7ab
3 changed files with 28 additions and 0 deletions
18
functions/dotfish.fish
Normal file
18
functions/dotfish.fish
Normal 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
|
5
functions/echo_highlight.fish
Normal file
5
functions/echo_highlight.fish
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
function echo_highlight
|
||||||
|
set_color yellow
|
||||||
|
echo -n $argv
|
||||||
|
set_color normal
|
||||||
|
end
|
5
functions/echo_progress.fish
Normal file
5
functions/echo_progress.fish
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
function echo_progress
|
||||||
|
set_color yellow --dim
|
||||||
|
echo -n $argv
|
||||||
|
set_color normal
|
||||||
|
end
|
Loading…
Reference in a new issue