stup icon indicating copy to clipboard operation
stup copied to clipboard

Add bash completion

Open iridakos opened this issue 4 years ago • 5 comments

Add bash completion related to the following contexts.

  • command selection
  • category names

iridakos avatar Apr 12 '20 20:04 iridakos

How about along with zsh and fish? 🙂

hedyhli avatar Jul 31 '20 07:07 hedyhli

Has anyone written one of these yet?

wwalker avatar Sep 11 '23 05:09 wwalker

Neh, I don't think so. Not yet. Volunteering?

dbv-rl avatar Sep 11 '23 12:09 dbv-rl

@dbv-rl

Sort of ... I've created a very basic stup-completions here:

https://github.com/wwalker/stup/tree/bash-completion-%232

It completes command names and seems to work fairly well at options and --category.

However it is my first real completion script, and I only found stup because of @iridakos's "how to create a bash completion" tutorial.

So, I have not used stup at all, except to write the completion script, (and a stup bash-completion sub command to dynamically write the completion command, which isn't in that branch right now, it's in the other bash-completion-... branch).

I'd appreciate any feedback.

wwalker avatar Sep 11 '23 14:09 wwalker

@wwalker Basic is IMHO better than nothing. I'll give it a try and add it to my ansible role for stup. I'll try to let you know how it worked. will take a week or two, though..

Update: I had some time looking at it and it worked right out of the box so far. Thanks for the effort. This is something that maybe could/should be included into this project as well? @iridakos

dbv-rl avatar Sep 12 '23 14:09 dbv-rl