Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants