# tab completion using ! history command

**URL:** <https://community.unix.com/t/tab-completion-using-history-command/158261>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [December 17, 2005, 2:55pm UTC](https://community.unix.com/t/tab-completion-using-history-command/158261 "2005-12-17T14:55:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![x-375HK-x](https://community.unix.com/letter_avatar/x-375hk-x/32/6_22734026db12803ebb3e059622ac3534.png) [@x-375HK-x](https://community.unix.com/u/x-375HK-x)\
**Post date:** [December 17, 2005, 2:55pm UTC](https://community.unix.com/t/tab-completion-using-history-command/158261/1 "2005-12-17T14:55:44Z")

</div>

Hi all,

I recently discovered the ! command. I think it's great that !cd ? will match the last command that began with cd ?. However, for ! to be particularly useful to me (for now anyway) it would be nice if there was a tab completion option available (as with the cd command). Does anyone know if there is a way to do this? I'm using csh for now, but maybe another shell?

Thanks!

jeff

---

<div class="post-metadata">

**Author:** ![reborg](https://community.unix.com/user_avatar/community.unix.com/reborg/32/167_2.png) [@reborg](https://community.unix.com/u/reborg)\
**Post date:** [December 17, 2005, 3:30pm UTC](https://community.unix.com/t/tab-completion-using-history-command/158261/2 "2005-12-17T15:30:16Z")

</div>

I'm pretty sure you can do exactly what you want with bash as your shell.

---

<div class="post-metadata">

**Author:** ![Sudipta\_Biswas](https://community.unix.com/letter_avatar/sudipta_biswas/32/6_22734026db12803ebb3e059622ac3534.png) [@Sudipta\_Biswas](https://community.unix.com/u/Sudipta_Biswas)\
**Post date:** [December 17, 2005, 5:01pm UTC](https://community.unix.com/t/tab-completion-using-history-command/158261/3 "2005-12-17T17:01:30Z")

</div>

Hi! friend,

WelCome to you.  
I don't understand which Vendor or Version of UNIX OS you are using, however, you just check that you have bash or bash2 shell in your system and used that shell(s) will help you.

---

<div class="post-metadata">

**Author:** ![x-375HK-x](https://community.unix.com/letter_avatar/x-375hk-x/32/6_22734026db12803ebb3e059622ac3534.png) [@x-375HK-x](https://community.unix.com/u/x-375HK-x)\
**Post date:** [December 18, 2005, 12:37am UTC](https://community.unix.com/t/tab-completion-using-history-command/158261/4 "2005-12-18T00:37:16Z")

</div>

Thanks for the help! I ran a bash shell and tried it out, but it didn't work. Do you know of any parameters that need to be set? Doesn't the tab complete for cd require enabling in the .cshrc file?
