Linux Commands Examples

A great documentation place for Linux commands

tabs

set tabs on a terminal


see also : tset - infocmp

Synopsis

tabs [-v[n]] [-ahuUV] file...


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source

Why is Chromium running all tabs in a single process?

The Google Chromium developer documentation specifies that there are three different ways that Chrome or Chromium can launch processes.

Many people may not know this, but the Chrome/Chromium developers do split tests on users (called "Field Trials"), where different options will be chosen for you and your group of users.

It could be that you are in a Field Trial to check what the performance impact is between different types of process models (http://www.chromium.org/developers/design-documents/process-models)

0
source

Converting tabs to spaces in many files

Try the following:

find ./ -type f -exec sed -i 's/\t/ /g' {} \;

If you want four spaces, try:

find ./ -type f -exec sed -i 's/\t/    /g' {} \;

0
source

How do I use tabs with the Linux "Screen" program?

Add this to your .screenrc file:

caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"

After you restart your screen, there's a status bar below showing the current tab name, and as a bonus your current host name and time -- modify them away at will if you so wish.

To rename a tab, press Ctrl+a+A and give it a new name.

You can move between tabs (well, windows but think of them as tabs) with Ctrl+a+tabnumber or Ctrl+a+n (go to next tab) / Ctrl+a+p (go to previous tab).

0
source

how to enable command line autocomplete after sqlite

From: http://www.linux.com/archive/feed/54005

complete -G "*.db" sqlite would associate .db files with sqlite.

For permanent associations, you need to add the command to one of the bash startup scripts, such as ~/.bashrc.

0
source

In vim, how can I quickly switch between tabs?

(Unfortunately) vim also uses CtrlPgDn/PgUp to cycle through tabs. You'll need to use map to map tabn/tabp to something usable.

0
source

How do I turn off or adjust the clever tab completion in Ubuntu (Programmable Completion)

comment out these lines in /etc/bash.bashrc (it may be in ~/.bashrc):

if [ -f /etc/bash_completion ]; then
 . /etc/bash_completion
fi

0
source

Number typing issue on RedHat

Maybe something in your keybinding is messed up.
If you're on KDE, could you check the following: (If you're on Gnome, let me know)

  • In the terminal screen goto Settings
  • Choose Edit Current Profile
  • Goto the Keyboard-tab
  • Edit the default
  • Type in the textarea a 6 in the Input-box

What output do you get in Output-box? It should say 6.
If you got a 6 somewhere in the left column in that list above that, it doesn't belong there.

Edit:

If you get the input/output boxes you are probably using Konsole from Kde.

Some follow-up questions (you can edit your question with the answers):

  • Are you indeed using Konsole? Check Help>About ???.
  • If it is Konsole: Could you check Settings>Configure shortcuts? Is there a 6 (you can type 6 in the search to get all the 6's).
  • I take it you can type the 6's in all other applications?
  • Are you using a desktop or laptop?
  • What shell are you using? (You can type echo $0 to determine if bash, ksh etc...)
  • If in bash: could you do a bind -p | grep 6? You need to paste the 6 from another application because you can't type it. Is there a "6": self-insert?
  • Do the 8 and the 2 do something? (Like scrolling up/down if you have enough lines in terminal) Or do they work properly?
  • You could try a different shell. If you're in ksh try typing bash + enter
    If you're in bash try typing ksh enter. (or other combination)
  • And last (I know, it's a lot :)
    If you start the gnome-terminal (if it is still installed) can you type the 6?
0
source

Unix tab tab equivalent?

I don't know how to accomplish exactly what you're asking, but instead you could possibly use the find command:

find /usr/bin -iname "ssh*keygen"

0
source

What are some Linux lightweight PDF alternatives that support tabs?

If you have the KDE libraries installed, I suppose you could use Konqueror - it's really intended as a web browser, but it has tabs, and it can display PDFs using the Okular KPart.

0
source

Porting GNOME keyboard shortcuts to URXVT

You can do this manually by modifying the perl extension for tabs (tabbed) and changing the keys it responds to. I got it to change tabs with alt + 1 ... alt + 9 by modifying the tab_key_press method:

You can get the original tabbed script from the source distribution of urxvt in the folder rxvt-unicode-9.15/src/perl/tabbed, find the function, and replace it with the method below.

When that is done, you can save the modified file in /some/folder/tabz and run urxvt with urxvt --perl-lib /some/folder -pe tabz

I think it should be possible to configure this with with X resources (~/.Xdefaults), so perhaps I'll make a version of the script that reads from there in the future and mail it to the urxvt maintainer, but for now:

sub tab_key_press {
   my ($self, $tab, $event, $keysym, $str) = @_;
   warn "keysym: ", $keysym;

   #if ($event->{state} & urxvt::ShiftMask) {
   if ($event->{state} & urxvt::Mod1Mask) {
      if ($keysym == 0xff51 || $keysym == 0xff53) {
         my ($idx) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };

         --$idx if $keysym == 0xff51;
         ++$idx if $keysym == 0xff53;

         $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);

         return 1;
      } elsif ($keysym == 0xff54) {
         $self->new_tab;

         return 1;
      } elsif ( $keysym == 0x31 || $keysym == 0x32 || $keysym == 0x33 ||
                $keysym == 0x34 || $keysym == 0x35 || $keysym == 0x36 ||
                $keysym == 0x37 || $keysym == 0x38 || $keysym == 0x39
      ) {
         my $idx = 0;
         $idx = 0 if $keysym == 0x31;
         $idx = 1 if $keysym == 0x32;
         $idx = 2 if $keysym == 0x33;
         $idx = 3 if $keysym == 0x34;
         $idx = 4 if $keysym == 0x35;
         $idx = 5 if $keysym == 0x36;
         $idx = 6 if $keysym == 0x37;
         $idx = 7 if $keysym == 0x38;
         $idx = 8 if $keysym == 0x39;
         warn scalar @{  $self->{tabs} };
         $self->make_current ($self->{tabs}[ $idx ]) if ($idx <  (scalar @{$self->{tabs}})) ;
         return 1;
      }
   }
   elsif ($event->{state} & urxvt::ControlMask) {
      if ($keysym == 0xff51 || $keysym == 0xff53) {
         my ($idx1) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };
         my  $idx2  = ($idx1 + ($keysym == 0xff51 ? -1 : +1)) % @{ $self->{tabs} };

         ($self->{tabs}[$idx1], $self->{tabs}[$idx2]) =
            ($self->{tabs}[$idx2], $self->{tabs}[$idx1]);

         $self->make_current ($self->{tabs}[$idx2]);

         return 1;
      }
   }

   ()
}

description

The tabs program clears and sets tab-stops on the terminal. This uses the terminfo clear_all_tabs and set_tab capabilities. If either is absent, tabs is unable to clear/set tab-stops. The terminal should be configured to use hard tabs, e.g.,

stty tab0

options

General Options
-T
name

Tell tabs which terminal type to use. If this option is not given, tabs will use the $TERM environment variable. If that is not set, it will use the ansi+tabs entry.

-d

The debugging option shows a ruler line, followed by two data lines. The first data line shows the expected tab-stops marked with asterisks. The second data line shows the actual tab-stops, marked with asterisks.

-n

This option tells tabs to check the options and run any debugging option, but not to modify the terminal settings.

The tabs program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the list to be processed.

Implicit Lists
Use a single number as an option, e.g., "-5" to set tabs at the given interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up to the right margin of the screen.

Use "-0" to clear all tabs.

Use "-8" to set tabs to the standard interval.

Explicit Lists
An explicit list can be defined after the options (this does not use a "-"). The values in the list must be in increasing numeric order, and greater than zero. They are separated by a comma or a blank, for example,

tabs 1,6,11,16,21
tabs 1 6 11 16 21

Use a ’+’ to treat a number as an increment relative to the previous value, e.g.,

tabs 1,+5,+5,+5,+5

which is equivalent to the 1,6,11,16,21 example.

Predefined Tab-Stops
X/Open defines several predefined lists of tab stops.

-a

Assembler, IBM S/370, first format

-a2

Assembler, IBM S/370, second format

-c

COBOL, normal format

-c2

COBOL compact format

-c3

COBOL compact format extended

-f

FORTRAN

-p

PL/I

-s

SNOBOL

-u

UNIVAC 1100 Assembler

portability

X/Open describes a +m option, to set a terminal’s left-margin. Very few of the entries in the terminal database provide this capability.

The -d (debug) and -n (no-op) options are extensions not provided by other implementations.

Documentation for other implementations states that there is a limit on the number of tab stops. While some terminals may not accept an arbitrary number of tab stops, this implementation will attempt to set tab stops up to the right margin of the screen, if the given list happens to be that long.


see also

tset , infocmp , ncurses(3NCURSES), terminfo.

This describes ncurses version 5.9 (patch 20110404).

How can this site be more helpful to YOU ?


give  feedback