0

I live by tab completion. However one recurring problem I have is when I want to grep for a tab character. With tab completion enabled, there is no way to type a tab character into the command line without disabling tab completion completely and starting a new bash session - at least, not that I could find.

I do not wish for a solution that requires re-logging in for the changes to take. I just want to enter a literal tab character in the command line.

Specific to the grep command, one solution is to search for the character class "[[:space:]]", but that's a bit tedious to type out. I was hoping for a quicker (fewer keystrokes) way to accomplish it (I could make an alias I suppose); but at the same time, I'd like a more generalized solution for typing a tab character into the command line that works for more than just grep.

ePhrygian
  • 51
  • 6

1 Answers1

5

To enter a literal tab, use Control-VTab.

chepner
  • 497,756
  • 71
  • 530
  • 681