Is there a function on one of the linux shells like the emacs dabbrev-expand?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First to give a definition:
M-xdescribe-functionEnterdabbrev-expandEnter
Given that
bashseems to be most heavily influenced by Emacs, looking there first reveals a few possibilities:man bash(1), readline section
By default (or my system at least), M-/ is already bound to
complete-filename:You could re-bind it by putting
in your
~/.inputrcor/etc/inputrc.Note that it only seems to complete the first word (the command), and only from history, not from the current command line as far as I can tell.
In zsh, I can’t see anything in the man page that does this, but it should be possible to make it happen by figuring out the appropriate
compctlcommand (Google mirror).