From 99a7fd039886695d78f0939dcd9042d35c2ea051 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 31 Oct 2020 18:16:56 -0400 Subject: [PATCH] Add swim.fish to project --- .config/fish/fishfile | 1 + swim.fish | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 swim.fish diff --git a/.config/fish/fishfile b/.config/fish/fishfile index b811660..133fcb8 100644 --- a/.config/fish/fishfile +++ b/.config/fish/fishfile @@ -1 +1,2 @@ jethrokuan/z +mitchell/swim.fish diff --git a/swim.fish b/swim.fish new file mode 100644 index 0000000..c19ee40 --- /dev/null +++ b/swim.fish @@ -0,0 +1,46 @@ +##!/usr/bin/env fish +# Uncomment this line and the last 2 lines of this file to enable running it like `./swim.fish`. +# +# This swim.fish script serves as a central place to store frequently run commands for this project. +# Replace Commands section with your own command functions. +# Source: https://github.com/mitchell/swim.fish + +# Configuration + +set -g cmd_func_prefix 'swim' # Set the function prefix for defining tasks +set -g fish_files \ + ./install_arch \ + ./provision_linux \ + ./sync \ + ./upgrade_debian \ + ./**.fish \ + ./.**.fish + +# Commands + +function swim_lint -d 'Lint fish scripts' + fish --no-execute $fish_files +end + +function swim_format -d 'Format fish scripts' + fish_indent --write $fish_files +end + +function swim_sync -d 'Run the sync script' + ./sync +end + +function swim_install_arch -d 'Run the install_arch script' + ./install_arch +end + +function swim_provision_linux -a distro -d 'Run the provision_linux script with the specified distro' + if test -n "$distro" + set -g distro $distro + end + + ./provision_linux $argv[2..-1] +end + +#curl -fsS https://raw.githubusercontent.com/mitchell/swim.fish/master/importable_sw.fish | source +#run_swim_command 'swim' $argv