Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. # patch for `service` completion so it also provides completion for ubuntu upstart init jobs, obviously only relevent to zsh users on Ubuntu
  2. % diff -Naur _services.orig /usr/share/zsh/functions/Completion/Unix/_services
  3. --- _services.orig
  4. +++ /usr/share/zsh/functions/Completion/Unix/_services
  5. @@ -30,6 +30,7 @@
  6. fi
  7. done
  8. _wanted services expl service compadd "$@" - $dir/*(-*:t) &&
  9. + _wanted services expl service compadd "$@" - /etc/init/*.conf(-.:t:r) &&
  10. ret=0
  11. fi
  12.  
  13.  
  14. # before
  15. % service w<tab>
  16. Completing service name
  17. cups-browsed networking vboxweb-service
  18.  
  19. # after :)
  20. % service w<tab>
  21. Completing service name
  22. cups-browsed hwclock hwclock-save networking network-interface network-interface-container
  23. network-interface-security network-manager passwd plymouth-shutdown shutdown strongswan
  24. teamviewerd ufw usb-modeswitch-upstart vboxweb-service wait-for-state whoopsie
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement