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

More completions #32

Open
7 of 26 tasks
The-Compiler opened this issue Oct 1, 2014 · 25 comments · May be fixed by #8053
Open
7 of 26 tasks

More completions #32

The-Compiler opened this issue Oct 1, 2014 · 25 comments · May be fixed by #8053
Labels
component: completion Issues related to the commandline completion or history. component: ui Issues related to the user interface. easy Issues which are likely to be a good fit for first-time contributors. priority: 1 - middle Issues which should be done at some point, but aren't that important.

Comments

@The-Compiler
Copy link
Member

The-Compiler commented Oct 1, 2014

More things should be supported for the completion, for example:

  • URLs (history)
  • Flags for commands
  • Choices for commands
  • Choices for flags with arguments (Show completions for args with declared choices #1532)
  • Userscript in userscript paths with :spawn --userscript (Complete userscript paths for spawn. #1543)
  • Keys for :bind
  • Existing bindings for :unbind
  • Commands for :bind, aliases, etc.
  • Tabs (with a :buffer command)
  • Tabs in current window for :tab-focus
  • Aliased commands
  • Commands after ;;
  • File paths for download, etc. (done for :open via Add local file paths to URL completion #6038)
  • Closed tabs for :undo
  • back/forward history for :back/:forward (tab-history command feature #1561)
  • Search engine names (PR at Added searchengine completion #2191, after SQL completion)
  • Search engine results/suggestions? - split off to Completion for search terms #6049
  • Saving and suggesting prior search terms after specifying a search engine in :open (e.g. after :open -t gmaps new york, the completion after :open -t gmaps would suggest that).
  • Downloads for download-{open,delete,remove,retry}
  • Commands from command history
  • Existing quickmark names when saving a quickmark
  • Elements for list/dict settings
  • Anchors for :scroll-to-anchor
  • Available fonts for font settings
  • Commands and their arguments with :later / :repeat / :run-with-count (see comment below)
  • Arguments for :hint
@The-Compiler The-Compiler self-assigned this Oct 1, 2014
@The-Compiler The-Compiler added component: ui Issues related to the user interface. enhancement labels Oct 1, 2014
This was referenced Feb 13, 2015
@The-Compiler The-Compiler mentioned this issue Mar 11, 2015
10 tasks
@The-Compiler The-Compiler added the component: completion Issues related to the commandline completion or history. label Jun 16, 2015
@The-Compiler The-Compiler added the priority: 1 - middle Issues which should be done at some point, but aren't that important. label Oct 1, 2015
@The-Compiler The-Compiler removed their assignment Oct 1, 2015
@lahwaacz

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@rcorre
Copy link
Contributor

rcorre commented Jun 9, 2016

For back/forward, I'm imagining functionality similar to buffer

The-Compiler added a commit that referenced this issue May 16, 2020
The-Compiler added a commit that referenced this issue Jul 29, 2020
@The-Compiler
Copy link
Member Author

Completion for :back, :forward and :undo just landed FWIW!

@The-Compiler
Copy link
Member Author

Another one: Commands and their arguments with :later / :repeat / :run-with-count

This is only a partial solution:

diff --git i/qutebrowser/completion/models/miscmodels.py w/qutebrowser/completion/models/miscmodels.py
index 925f95bbb..4f44b88e6 100644
--- i/qutebrowser/completion/models/miscmodels.py
+++ w/qutebrowser/completion/models/miscmodels.py
@@ -28,7 +28,7 @@
 from qutebrowser.browser import inspector
 
 
-def command(*, info):
+def command(*_args, info):
     """A CompletionModel filled with non-hidden commands and descriptions."""
     model = completionmodel.CompletionModel(column_widths=(20, 60, 20))
     cmdlist = util.get_cmd_completions(info, include_aliases=True,
diff --git i/qutebrowser/misc/utilcmds.py w/qutebrowser/misc/utilcmds.py
index 56138c798..d8d6b3a4a 100644
--- i/qutebrowser/misc/utilcmds.py
+++ w/qutebrowser/misc/utilcmds.py
@@ -36,11 +36,13 @@
 from qutebrowser.api import cmdutils
 from qutebrowser.misc import (  # pylint: disable=unused-import
     consolewidget, debugcachestats, objects, miscwidgets)
+from qutebrowser.completion.models import miscmodels
 from qutebrowser.utils.version import pastebin_version
 from qutebrowser.qt import sip
 
 
 @cmdutils.register(maxsplit=1, no_cmd_split=True, no_replace_variables=True)
+@cmdutils.argument('command', completion=miscmodels.command)
 @cmdutils.argument('win_id', value=cmdutils.Value.win_id)
 def later(ms: int, command: str, win_id: int) -> None:
     """Execute a command after some time.
@@ -70,6 +72,7 @@ def later(ms: int, command: str, win_id: int) -> None:
 
 
 @cmdutils.register(maxsplit=1, no_cmd_split=True, no_replace_variables=True)
+@cmdutils.argument('command', completion=miscmodels.command)
 @cmdutils.argument('win_id', value=cmdutils.Value.win_id)
 @cmdutils.argument('count', value=cmdutils.Value.count)
 def repeat(times: int, command: str, win_id: int, count: int = None) -> None:
@@ -91,6 +94,7 @@ def repeat(times: int, command: str, win_id: int, count: int = None) -> None:
 
 
 @cmdutils.register(maxsplit=1, no_cmd_split=True, no_replace_variables=True)
+@cmdutils.argument('command', completion=miscmodels.command)
 @cmdutils.argument('win_id', value=cmdutils.Value.win_id)
 @cmdutils.argument('count', value=cmdutils.Value.count)
 def run_with_count(count_arg: int, command: str, win_id: int,

as it continues to complete command names after a space is entered.

@MrbeanN513

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@samyak-jain

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@samyak-jain

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@samyak-jain

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@samyak-jain

This comment has been minimized.

@andrewcarlotti

This comment has been minimized.

@The-Compiler
Copy link
Member Author

Whoops, that was the wrong button 😆

Since we now have quite a lot of discussion about one single point here, let's split this off to #6049 instead. I'll answer over there.

knezi added a commit to knezi/qutebrowser that referenced this issue Jan 1, 2024
@knezi knezi linked a pull request Jan 1, 2024 that will close this issue
knezi added a commit to knezi/qutebrowser that referenced this issue Jan 11, 2024
knezi added a commit to knezi/qutebrowser that referenced this issue Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: completion Issues related to the commandline completion or history. component: ui Issues related to the user interface. easy Issues which are likely to be a good fit for first-time contributors. priority: 1 - middle Issues which should be done at some point, but aren't that important.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants