PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, May 18, 2022

[FIXED] How to configure bash completion to expand partial path like in emacs "minibuffer-complete"?

 May 18, 2022     bash, bash-completion, emacs, partial, path     No comments   

Issue

I would like to configure my bash shell to expand partially entered tree structure like it does emacs "minibuffer-complete" command.

Imagine I have two folders, foo1 and foo2. foo1 contains a subfolder sub1, and foo2 contains subfolder wow. So I have:

foo1/sub1/

foo2/wow/

Now when opening a file in emacs if I type

f/w

and press TAB it will automatically expand it to "foo1/wow/".

I would like to have a similar functionality in bash. Any ideas?


Solution

Whilst I don't know how to do this in bash, or even if it's possible, I know that if you change your shell to zsh, it can be done.

It's not enabled by default, and I'm not sure how to enable it either, but I use the zsh grml config, which enables the kind of expansion you're talking about.

Zsh, especially combined with said config, also has many other helpful features.

If you're not willing to change shell, then this isn't a helpful answer I'm afraid.



Answered By - Squidly
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing