Questions tagged [completion]
250 questions
60
votes
5 answers
OpenAI ChatGPT (GPT-3.5) API error 429: "You exceeded your current quota, please check your plan and billing details"
I'm making a Python script to use OpenAI via its API. However, I'm getting this error:
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details
My script is the following:
#!/usr/bin/env python3.8
#…

Unix
- 1,358
- 3
- 14
- 23
24
votes
3 answers
widgets can only be called when ZLE is active
I have been dealing with this problem for almost a month now, and I feel frustrated, Any help would be greatly appreciated.
I am trying to write a widget for my takenote command. The purpose of the widget is to feed all the markdown files in ~/notes…

ExistMe
- 509
- 6
- 18
22
votes
5 answers
Cannot find module '../lib/completion' Inspite of installing Completion
I am getting this error Cannot find module '../lib/completion' however I have installed completion and completion.js is present in the lib file.
->gulp compile
module.js:327
throw err;
^
Error: Cannot find module '../lib/completion'
at…

Utpal - Ur Best Pal
- 4,472
- 3
- 17
- 28
21
votes
1 answer
Declare protocol function with default argument values
I want this function be in protocol:
func slideToRight(currentViewController viewController: UIViewController, completion: ((Bool)->())? = nil) {
// do some stuff
}
But when I write such protocol:
protocol SomeDelegate {
func…

Roman Vygnich
- 319
- 1
- 2
- 6
14
votes
1 answer
How do I defer shell completion to another command in bash and zsh?
I am attempting to write a shell script utility that wraps other shell utilities into a single CLI and am trying to get shell completion to work in zsh and bash.
For example, let's say the CLI is named util:
util aws [...args] #=> runs aws
util…

Jacob Gillespie
- 3,981
- 3
- 23
- 33
12
votes
3 answers
SKAction Completion Handlers; usage in Swift
I'm new to Swift and SpriteKit. A lot of the samples of SpriteKit Actions are in Objective C, which I can't map to, nor get working, in Swift.
If running an SKAction, and upon SKAction completion wanting to do something else, how do I get this…

spacecash21
- 1,331
- 1
- 19
- 41
11
votes
1 answer
How to make the up and down arrow keys show history entries in a script using zsh?
As shown in this answer, it's possible to use read with Readline (-e) in bash to return previous history items by using the up and down keys:
#! /usr/bin/env bash
while IFS="" read -p "input> " -e line; do
history -s "$line" # append $line to…

nachocab
- 13,328
- 21
- 91
- 149
10
votes
2 answers
Fix zsh _arguments options (--whatever) completion after non-options (noDashes) input
I would like to allow completion for --flags after other input in my gradle completion script, but _arguments seems to require that
specs that describe option flags must precede specs that describe non-option ("positional" or "normal") arguments of…

Eric Wendelin
- 43,147
- 9
- 68
- 92
10
votes
1 answer
Elasticsearch completion suggest search with multiple-word inputs
Using the Elasticsearch completion suggester I have problems returning multi-word input suggestions matching a one-word query.
Example structure:
PUT /test_index/
{
"mappings": {
"item": {
"properties": {
…

Neman
- 1,237
- 2
- 13
- 16
9
votes
1 answer
Very slow completion and code highlighting in Qt Creator
I have Qt Creator 4.1.0 ubuntu 16.04. And I have problems with completion and code highlighting. I need to wait 3-4 secs(or more) for completion code and highlight key words.
What is wrong?
Qt Creator 3.6.0 is working normally.

djkah11
- 446
- 5
- 21
7
votes
2 answers
Android Studio - Kotlin auto-completion is not working
Kotlin auto-completion does not work in Android Studio.
Java and XML auto-completion are working but Kotlin isn't working.
Kotlin not working example:
XML working example:
Java working example:

Volkan Demir
- 83
- 1
- 5
7
votes
3 answers
Completion block never called at end of SKAction sequence of groups
Why is the completion never called?
I'm terribly sorry about this, a code dump... because I have no idea why every part of this works, except for the calling of the completion.
The SKAction that's not calling its completion runs, all except for the…

Confused
- 6,048
- 6
- 34
- 75
7
votes
1 answer
Strange autocompletion result in emacs + common lisp
I am using Emacs with SLIME for my development environment. When I type (write-to and then C-M-i I get the following autocompletions:
Click on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible…

anonymous
- 1,522
- 14
- 24
7
votes
6 answers
What is the difference between Completion time and response time when dealing with scheduling policies
I've been looking online for a while now, trying to find definitions and examples on these two terms but I cannot seem to get a straight answer and I am simply getting more confused.
Could someone explain the difference to me. A nice and…

Sigma
- 123
- 1
- 2
- 8
7
votes
3 answers
fish shell -eq and -a in if statement
I was reading the git.fish completion script (/usr/local/Cellar/fish/2.1.2/share/fish/completions) for fish shell and I ran into some problems with understanding what the syntax means.
In the block,
function __fish_git_needs_command
set cmd…

Hasit Mistry
- 329
- 1
- 4
- 18