Browse Source

Fixing bash-completion

Héctor García 10 years ago
parent
commit
2295b2386a
2 changed files with 7 additions and 2 deletions
  1. 6 2
      debian/mssh.bash-completion
  2. 1 0
      debian/rules

+ 6 - 2
debian/mssh.bash-completion

@@ -3,8 +3,12 @@
 
 _mssh_alias()
 {
-  COMPREPLY=( $( compgen -W '$( command cat ~/.mssh_clusters 2>/dev/null \
-     | grep -v "^\s*$" | grep -v "^#" | sed -e "s/:.*$//" )' -- $cur ) )
+  if [ -f ~/.mssh_clusters ]; then
+    COMPREPLY=( $( compgen -W '$( command cat ~/.mssh_clusters 2>/dev/null \
+       | grep -v "^\s*$" | grep -v "^#" | sed -e "s/:.*$//" )' -- $cur ) )
+  fi
+
+  return 0
 }  
 
 _mssh()

+ 1 - 0
debian/rules

@@ -52,6 +52,7 @@ binary-arch: install
 	dh_installexamples mssh_clusters.conf
 	dh_installdocs
 	dh_installman
+	dh_bash-completion
 	dh_gconf
 	dh_link
 	dh_strip