TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Reverse Tab Completion

2 点作者 lucasgonze大约 6 年前
Is it possible to get reverse tab completion, so that you type the last characters in the filename you want, press tab (or whatever the reverse keystroke is), and get the full file name?<p>Sometimes I have files where the unique bit is at the end, and tab completion is useless for them. For example with these ---<p>version1.txt version2.txt version3.txt<p>--- I&#x27;d have to type out &quot;version&quot; before hitting tab, and what I&#x27;d like is to type 1.txt, hit tab, and have &quot;version&quot; prepended.

1 comment

ktpsns大约 6 年前
Shells like bash do wildcard expansion on tab keystroke. So you type<p><pre><code> cat version*.txt </code></pre> then tab and it expands that into<p><pre><code> cat version1.txt version2.txt version3.txt </code></pre> The same is of course true with any other kind of wildcard like<p><pre><code> *.tar.gz </code></pre> (is that what you mean with reverse tab completion?) And even ranges like &quot;version{1..3}&quot; and much more. Look up <a href="http:&#x2F;&#x2F;bash-hackers.org" rel="nofollow">http:&#x2F;&#x2F;bash-hackers.org</a>, the ultimate guide for shell globbing and other bash features.