Skip to content

Instantly share code, notes, and snippets.

@zimme
Last active August 25, 2017 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zimme/e68f2392e9ad4f2f154dc081571c3d26 to your computer and use it in GitHub Desktop.
Save zimme/e68f2392e9ad4f2f154dc081571c3d26 to your computer and use it in GitHub Desktop.
Meteor related fish shell functions
# This will create an alias function for meteor
# if Meteor is installed.
# The alias will allow you to run meteor from
# a git checkout by using the --git flag
# Note: You need to have a Meteor git checkout
# in ~/Development/meteor or where ever you set
# the path to.
if test -e /usr/local/bin/meteor
function meteor
if count $argv > /dev/null
for i in (seq (count $argv))
if test x"$argv[$i]" = x'--git' -a -d ~/Development/meteor
set -e argv[$i]
~/Development/meteor/meteor $argv
return $status
end
end
end
eval (which meteor) $argv
end
end
# This will create an alias function for npm
# if Meteor is installed.
# The alias will call meteor npm instead of npm
# if we're inside a Meteor project root directory
if test -e /usr/local/bin/meteor
function npm
if test -e .meteor/release
eval (which meteor) npm $argv
else
eval (which npm) $argv
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment