mirror of https://github.com/mitchell/dotfiles.git
Add swim.fish to project
This commit is contained in:
parent
7a361e5260
commit
99a7fd0398
|
@ -1 +1,2 @@
|
||||||
jethrokuan/z
|
jethrokuan/z
|
||||||
|
mitchell/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
|
Loading…
Reference in New Issue