Skip to content

Instantly share code, notes, and snippets.

@gnufied
Created September 20, 2013 13:40
Show Gist options
  • Save gnufied/6637720 to your computer and use it in GitHub Desktop.
Save gnufied/6637720 to your computer and use it in GitHub Desktop.
cmd = ARGV[0]
cur = ARGV[1].shellunescape
#ARGV seems to be empty array when completion script is invoked via zsh tab-complete
prev = ARGV[2].shellunescape
point = ENV['COMP_POINT'].to_i
line = ENV['COMP_LINE'][0..point-1].shellunescape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment