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

Create a bash command argument completion file for manage.sh #78

Closed
jacg opened this issue Jan 15, 2017 · 3 comments
Closed

Create a bash command argument completion file for manage.sh #78

jacg opened this issue Jan 15, 2017 · 3 comments
Assignees

Comments

@jacg
Copy link
Collaborator

jacg commented Jan 15, 2017

Our manage.sh script is acquiring (#77) a large number of long and inconvenient to type command arguments. It would benefit immensely from completion help from the shell. I get the impression that most of us are using bash or some derivative. Let's provide a file which teaches bash how to complete manage.sh's arguments for us.

How this can be done seems to be described here.

Once made, this file can be sourced to enable the completion. You could do this in your .bashrc or similar.

@jjgomezcadenas
Copy link
Collaborator

Earth talking to Galactica. I hear that Capitan JJ won't do it. I guess admiral JCK is busy next couple of weeks. Shall we assign democratically to lieutenant JMB?

@jacg
Copy link
Collaborator Author

jacg commented Jan 15, 2017

Get in the habit of @-mentioning people who you want to read the message. In this case mentioning @jmbenlloch would have been a good idea.

I suggest that he assign himself, if he feels like taking it on. Otherwise, it can sit there in the list of issues until somebody takes pity on it, or someone thinks it needs to be given a higher priority. It's possibly not of the highest priority at the moment.

@jmbenlloch jmbenlloch self-assigned this Jan 15, 2017
@jjgomezcadenas
Copy link
Collaborator

jjgomezcadenas commented Jan 15, 2017 via email

jacg pushed a commit to jmbenlloch/IC-1 that referenced this issue Jan 20, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile
jacg pushed a commit to jmbenlloch/IC-1 that referenced this issue Jan 20, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jacg pushed a commit that referenced this issue Jan 20, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
@jacg jacg closed this as completed Jan 20, 2017
jacg pushed a commit that referenced this issue Sep 9, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jacg pushed a commit that referenced this issue Sep 10, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jacg pushed a commit that referenced this issue Sep 15, 2017
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit to jmbenlloch/IC-1 that referenced this issue Apr 24, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jacg pushed a commit to jacg/IC that referenced this issue Sep 14, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit to jmbenlloch/IC-1 that referenced this issue Oct 16, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit to jmbenlloch/IC-1 that referenced this issue Oct 16, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit to jmbenlloch/IC-1 that referenced this issue Oct 16, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit that referenced this issue Oct 16, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
jmbenlloch added a commit to jmbenlloch/IC-1 that referenced this issue Oct 16, 2018
First you need to execute the script:

    . bash_manage.sh

Then you it will autocomplete `bash manage.sh` or `source manage.sh`
in this way:

    $ source manage.sh [TAB][TAB]
    clean                   install                 run_tests
    compile_and_test        install_and_check       work_in_python_version
    download_test_db        make_environment

If you chose an option requiring python version it will offer you 2.7
and 3.5:

    $ source manage.sh work_in_python_version [TAB][TAB]
    2.7  3.5

The only problem is that some bash options are overwrite. For
instance, this will happen before executing the script:

    $ bash --[TAB][TAB]
    --debug            --help             --noprofile        --restricted
    --debugger         --init-file        --norc             --verbose
    --dump-po-strings  --login            --posix            --version
    --dump-strings     --noediting        --rcfile

This same file can be used by `zsh`: before sourcing `bash_manage.sh`,
you first have to instruct `zsh` to understand the `bash` autocomplete
instructons with

    autoload bashcompinit
    bashcompinit
    source bash_manage.sh
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

3 participants