Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic bash tab completion #214

Closed
davepacheco opened this issue Jan 9, 2015 · 5 comments
Closed

basic bash tab completion #214

davepacheco opened this issue Jan 9, 2015 · 5 comments
Assignees

Comments

@davepacheco
Copy link
Contributor

Initially requested by Yunong under internal ticket MANTA-705.

@trentm
Copy link
Contributor

trentm commented Jan 9, 2015

I ahve some notes (vapour right now) on adding support for bash completion file generation for dashdash and cmdln here: https://github.com/trentm/node-cmdln/blob/master/TODO.txt#L8-L18

@trentm
Copy link
Contributor

trentm commented Jul 4, 2016

Opinions welcome:
How would you suggest getting a user of node-manta to install bash completion files for all the (dozen or so) m* tools? For triton (a single command), users are pointed to instructions like these:

Installation (Mac):
    triton completion > /usr/local/etc/bash_completion.d/triton \
        && source /usr/local/etc/bash_completion.d/triton

Installation (Linux):
    sudo triton completion > /etc/bash_completion.d/triton \
        && source /etc/bash_completion.d/triton

However having the user do the equivalent of that for all the m* tools is obviously a non-starter.

Some ideas:

  1. Have a "install-me-some-node-manta-bash-completions.sh" script (obviously not
    literally that name) that is part of the node-manta install, but not on the
    path by default. This would attempt find an appropriate "bash_completion.d"
    directory (it varies) and write "{mls,mget,...}.completion" there.
  2. Perhaps have a npm post-install script that runs that script. Note that one
    of the issues is that sudo access might be needed to write to the
    "bash_completion.d" dir.
  3. Have a new mcompletion tool that is on the PATH that one can use to
    install completions. I think this pollutes the PATH a little bit.
  4. Have a new msetup tool that can install bash completions. This tool would
    (eventually) be a little more general than mcompletion in that it could
    help a user walk through setup of an account and MANTA_* envvars.

@trentm trentm changed the title would like tab completion basic bash tab completion Nov 23, 2016
@trentm
Copy link
Contributor

trentm commented Nov 23, 2016

I've updated the title to be "basic" bash completion. I'll open a separate ticket for more advanced completion: specifically completing Manta dirs and paths (e.g. mls ~~/stor/foo<TAB>).

CR for this ticket: https://cr.joyent.us/#/c/943/

@trentm
Copy link
Contributor

trentm commented Nov 23, 2016

Added #289 for improved bash completion work.

joyent-automation pushed a commit that referenced this issue Dec 6, 2016
Reviewed by: Chris Burroughs <chris.burroughs@joyent.com>
Approved by: David Pacheco <dap@joyent.com>
@trentm
Copy link
Contributor

trentm commented Dec 7, 2016

This is in manta@4.1.0 now

@trentm trentm closed this as completed Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants