shithub: hugo

Download patch

ref: 874159b5436bc9080aec71a9c26d35f8f62c9fd0
parent: 294c0f8001fe598278c1eb8015deb6b98e8de686
author: Anthony Fok <[email protected]>
date: Thu Apr 5 03:15:51 EDT 2018

snap: Add bash completion

--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -11,6 +11,7 @@
 apps:
   hugo:
     command: bin/hugo
+    completer: hugo-completion
     plugs: [home, network-bind, removable-media]
 
 parts:
@@ -34,10 +35,12 @@
       export PATH=$GOPATH/bin:$PATH
       [ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage hugoNoGitInfo || mage hugo
       ./hugo version
+      ./hugo gen autocomplete --completionfile=hugo-completion
     install: |
       install -d $SNAPCRAFT_PART_INSTALL/bin
       cp -a hugo $SNAPCRAFT_PART_INSTALL/bin/hugo
       strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo
+      mv hugo-completion $SNAPCRAFT_PART_INSTALL/hugo-completion
     after: [go]
   go:
     source-tag: go1.10