Skip to content

Instantly share code, notes, and snippets.

@zQueal
Created June 26, 2026 21:17
Show Gist options
  • Select an option

  • Save zQueal/1a5d88cb6cb14b596abfe83a87cec404 to your computer and use it in GitHub Desktop.

Select an option

Save zQueal/1a5d88cb6cb14b596abfe83a87cec404 to your computer and use it in GitHub Desktop.
Elvish shell auto RTK completion
use str
set edit:after-readline = [
{|line|
var clean = (str:trim-space $line)
var words = [(str:split " " $clean)]
var targets = [git npm cargo pytest jest uv]
if (and (> (count $words) 0) (has-value $targets $words)) {
try {
e:rtk (all $words)
} catch e {
}
edit:return-line ""
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment