非文件系统路径或URI的选项卡完成(例如gs:// ...)

发布于 2025-02-03 13:13:45 字数 295 浏览 5 评论 0原文

除本地文件系统外,我还使用云存储(例如GCS,S3)进行数据分析。

我的问题是:是否有用于在本地固定文件系统上的文件路径或URI的工具(在Shell环境中)启用TAB完成(在Shell环境中)?例如,对于文件URI,例如gs://path/to/file.txt,我想在键入路径的一部分时完成选项卡。

注意:我不想使用FUSE(或MOUTE以某种方式使用文件系统或音量)。我想知道是否有bash或zsh扩展名可以为非文件系统URIS启用此功能,大概是在后台或其他内容中使用API​​调用。

I use cloud storage (eg gcs, s3) in addition to the local file system for data analysis.

My question is: are there tools that enable tab completion (in a shell environment) for file paths or URIs that aren't on local, mounted file systems? Eg for a file URI like gs://path/to/file.txt, I'd like to have tab completion when typing part of the path.

Note: I don't want to use FUSE (or mount a file system or volume in some way). I'm wondering if there are bash or zsh extensions that enable this functionality for non-file-system URIs, presumably with API calls in the background or something.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

山色无中 2025-02-10 13:13:45

gcloud Interactive shell具有自动完成和自动提示,以提示任何具有手动页面的命令,包括gcloudbqgsutilkubectl命令行工具。

要启用gcloud交互式shell:

  1. 首先通过运行命令gcloud组件安装beta beta首先安装gcloud beta组件。
  2. 运行gcloud beta Interactive输入GCLOUD交互式模式。

现在,您可以使用tab完成文件路径或资源分配

检查此链接,以获取 gcloud auto-complete

gcloud interactive shell has auto-complete and auto prompting for any command that has a manual page, including the gcloud, bq, gsutil, and kubectl command-line tools.

To enable the gcloud interactive shell:

  1. Install the gcloud beta components first by running the command gcloud components install beta.
  2. Run gcloud beta interactive to enter gcloud interactive mode.

You can now use the tab to complete a file path or resource assignment

Check this link for the official documentation of gcloud auto-complete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文