Questions tagged [programmable-completion]

8 questions
24
votes
2 answers

zsh: use completions for command X when I type command Y

In zsh, I have a function called g which acts like this: with no arguments, call git status with one or more arguments, delegate to git with all given arguments - i.e. call git $@ I would like the tab completions for g to be exactly the same as…
gfxmonk
  • 8,614
  • 5
  • 42
  • 53
11
votes
2 answers

Is it possible to detect when text wraps?

Is it possible to detect where text wraps? Lorem ipsum dolor sit amet lets say that above text wraps after 'dolor' word. How to detect that and insert there some mark of it so it would be Lorem ipsum dolor
sit amet for…
user1785870
  • 477
  • 1
  • 6
  • 16
4
votes
2 answers

Is there a good, online tutorial for learning intermediate-to-advanced Bash programmable completion?

My current skill level with programmable completion is pretty basic — about at "complete -d cd". I'd like to significantly increase my knowledge (and use) of completion to increase my CLI productivity, but I'm having trouble finding an online…
Ben Blank
  • 54,908
  • 28
  • 127
  • 156
4
votes
1 answer

Cycle through only specific file types in PS using custom tab completion on the command line

I use PowerShell's PSReadline-based tab completion and I'm looking to implement the following custom completion behavior: In a folder I have File1.java File1.class File2.java File2.class If I use tab after java I got a list of the files: java…
JDoeDoe
  • 361
  • 1
  • 2
  • 7
3
votes
7 answers

Bash Completion: What can we do with it, what lies in the future

Bash lets you complete commands names and names of files in the arguments with the TAB key. But why not also common options to commands? Why not, even better, a completion system that tells you what an option does, too? I heard of programmable…
luca
  • 12,311
  • 15
  • 70
  • 103
2
votes
0 answers

Change bash programmable completion (tab completion) output format

Bash tab completion conveniently executes some ls-like function whenever there are multiple completion options. For example, if ls yields test1 test2 test3 randomfile and all of those entries are folders then cd tes
cydonian
  • 1,686
  • 14
  • 22
0
votes
1 answer

having problems with android

Please have a look at the code below: When I use handler like this I get a warning(This Handler class should be static or leaks might occur ) Can someone tell me what is the best way to do this? private void cacheImages() { try { …
0
votes
0 answers

How could I register an app in Google App Engine programmatically?

I would like to register a new app on my Admin Console programmatically without having to visit the actual Admin Console webpage. I see there is no way to do it via API? Can anyone think of any other solution to do it with a script or some other…
eskalera
  • 1,072
  • 2
  • 21
  • 36