diff --git a/functions/dotfish.fish b/functions/dotfish.fish new file mode 100644 index 0000000..f2b6b92 --- /dev/null +++ b/functions/dotfish.fish @@ -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 \ No newline at end of file diff --git a/functions/echo_highlight.fish b/functions/echo_highlight.fish new file mode 100644 index 0000000..5544b14 --- /dev/null +++ b/functions/echo_highlight.fish @@ -0,0 +1,5 @@ +function echo_highlight + set_color yellow + echo -n $argv + set_color normal +end \ No newline at end of file diff --git a/functions/echo_progress.fish b/functions/echo_progress.fish new file mode 100644 index 0000000..79ac45e --- /dev/null +++ b/functions/echo_progress.fish @@ -0,0 +1,5 @@ +function echo_progress + set_color yellow --dim + echo -n $argv + set_color normal +end \ No newline at end of file