Skip to content

Instantly share code, notes, and snippets.

@colstrom
Last active December 9, 2016 19:20
Show Gist options
  • Select an option

  • Save colstrom/3a3e820812cabf8fd51562281c488572 to your computer and use it in GitHub Desktop.

Select an option

Save colstrom/3a3e820812cabf8fd51562281c488572 to your computer and use it in GitHub Desktop.
gistpkg-list.fish: list installed gistpkgs
function gistpkg-list
set local (gistpkg-config root)/(gistpkg-config origin)
if test (is-a-directory $local) = true
find $local -type d -mindepth 1 -name .git -exec dirname '{}' \; | string replace --all --regex "^$local/" ''
end
end
name = gistpkg-list
author = Chris Olstrom
license = MIT
provides = fish/functions/gistpkg-list
requires
command/dirname
command/find
fish/builtin/end
fish/builtin/function
fish/builtin/if
fish/builtin/set
fish/builtin/string
fish/builtin/test
fish/builtin/true
fish/functions/gistpkg-config
fish/functions/is-a-directory
fish/functions/local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment