Skip to content

Instantly share code, notes, and snippets.

@JosephDuffy
Last active February 20, 2019 16:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosephDuffy/596821c21b6810dd0c82639b1c6b8a64 to your computer and use it in GitHub Desktop.
Save JosephDuffy/596821c21b6810dd0c82639b1c6b8a64 to your computer and use it in GitHub Desktop.
fish function that uses bundler version of fastlane when available

To install add to ~/.config/fish/functions/. This can be done manually or via curl -o ~/.config/fish/functions/fastlane.fish https://gist.githubusercontent.com/JosephDuffy/596821c21b6810dd0c82639b1c6b8a64/raw/fastlane.fish

This function has 2 primary advantages:

  • No need to remember to type bundle exec before fastlane commands
  • Autocomplete will work when installed via fastlane enable_auto_complete

Disclamer: My fish scripting skills aren't exactly 💯. If you have any suggestions for improvements please tweet them at me!

function fastlane
if type -q bundle && bundle info fastlane > /dev/null ^&1
bundle exec fastlane $argv
else if which fastlane > /dev/null ^&1
set systemFastlane (which fastlane)
$systemFastlane $argv
else
echo "fastlane not found on system"
return 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment