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

Bash Completion script #18

Closed
infalmo opened this issue Jul 18, 2019 · 7 comments
Closed

Bash Completion script #18

infalmo opened this issue Jul 18, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@infalmo
Copy link

infalmo commented Jul 18, 2019

I know this is trivial, but can a bash completion script be made for this?

@xalanq
Copy link
Owner

xalanq commented Jul 18, 2019

OK~ I consider adding a new command like "clone" in this tool~

@xalanq xalanq added the enhancement New feature or request label Jul 18, 2019
@xalanq
Copy link
Owner

xalanq commented Jul 19, 2019

BTW, here is a bash script to clone your codes of all contests.

for((i=1;i<=2000;i++)); do cf pull ac $i; done

Just use it in terminal.

@xalanq
Copy link
Owner

xalanq commented Jul 19, 2019

What I want to add in cf tool is clone someone's codes not just ourselves'.

@infalmo
Copy link
Author

infalmo commented Jul 19, 2019

What I meant by bash script was a auto-completion capability. The auto-completion that takes place while pressing the tab button. The autocompletion for the following commands:

  cf config (login | add | del | default)
  cf submit [<filename>]
  cf submit [(<contest-id> <problem-id>)] [<filename>]
  cf list [<contest-id>]
  cf parse [<contest-id>] [<problem-id>]
  cf gen [<alias>]
  cf test [<filename>]
  cf watch [all] [<contest-id>]
  cf open [<contest-id>] [<problem-id>]
  cf stand [<contest-id>]
  cf sid [<submission-id>] [<contest-id>]
  cf race <contest-id>
  cf pull [ac] [<contest-id>] [<problem-id>]
  cf upgrade

@xalanq
Copy link
Owner

xalanq commented Jul 19, 2019

I'm sorry for it...... I thought your problem is #17.
OK.....I'll try to do what you meant

@xalanq
Copy link
Owner

xalanq commented Jul 21, 2019

I found a tool https://github.com/Infinidat/infi.docopt_completion. It works for me on Ubuntu 18.04.

@infalmo
Copy link
Author

infalmo commented Jul 21, 2019

Thanks. This works. For anyone who wants the configuration file, here it is. Copy the below file to /etc/bash_completion.d. Rename the below file to cf.sh.

cf.txt

@infalmo infalmo closed this as completed Jul 21, 2019
xalanq added a commit that referenced this issue Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants