25 09 | 2011

Increase your productivity with two spaces

Written by Tanguy

Classified in : Homepage, Debian, Command line

Shell prompts are often designed to provide a reminder of useful context information such user name, host and current directory:


Such a prompt is sufficient to serve its original purpose, but it can be enhances in at least one useful way. Sometimes you have to copy the path of the current directory: with this prompt, it means selecting it by precisely dragging the mouse over it. Well, by adding spaces around the current directory you can become able to select it with a simple double click:

PS1="\u@\h: \w \$"
tanguy@muscat: ~/public_html $

Indeed, with such a prompt, you can now roughly point to the path, double click, and let your terminal emulator's word detection feature select the whole path for you. This simple modification may save you several tenths of seconds!

05 09 | 2011

Startup scripts of Bash and Zsh

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Both Bash and Zsh use several startup scripts: profile, bashrc, zlogin, zshrc, etc.

The existence of several startup scripts exists to allow you to apply specific actions for interactive or login shells. For instance, you may want to set up a fancy colour prompt or to enable a powerful completion system for interactive shells only, as it would be pointless to apply it to non-interactive shells (that is, for shell scripts). Or you may want to display a joke and the weather forecast at login, but not each time you spawn a shell by other means.

Read more Startup scripts of Bash and Zsh

03 09 | 2011

Repacking ZIP-based containers

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

An open package showing two egg-like objects

Several modern complex file formats are based on a ZIP container: this is at least the case of OpenDocument and EPUB. However, they are not simply a bunch of files joined into an archive, but they follow some rules in order to be easily recognized by tools such as file. As I had to unpack, modify and repack such a container, here is a recipe to do that.

Read more Repacking ZIP-based containers

02 09 | 2011

rxvt-unicode: generate key symbols

Written by Tanguy

Classified in : Homepage, Debian, Command line

rxvt-unicode is a terminal emulator with some interesting features. Here is one of them I find most amazing and elegant: it can generate the symbol characters corresponding to keyboard keys.

It works by pressing and releasing ⎈ + ⇧ (⎈ is the symbol for the Control key, and ⇧ is Shift, of course), then the key which symbol you want to get.

For instance, to get the Caps lock symbol, you type ⎈ + ⇧, ⇬, which gives you the following symbol: ⇬. Here are some other nice examples: ↵ (Return) ⇮ (AltGr aka Level3 Shift) ⌫ (BackSpace) ⎀ (Insert) ⌦ (Delete) ⇱ (Home) ⇲ (End) ⇞ (Prior) ⇟ (Next).

Beware that this will not cancel the effect of {Caps, Num} lock keys: you will get their symbols but also enter the corresponding mode.

11 08 | 2011

ASCII Art signatures

Written by Tanguy

Classified in : Homepage, Debian, Command line, Miscellaneous, To remember, Vélo

Using a very customizable email user agent (namely, Mutt), I am able to use several signatures depending on almost whatever criterion I want. So I spent some time drawing several thematic ones in ASCII Art, sometimes taking inspiration on existing models, sometimes entirely by myself (in bold). Hoping that it may be useful, here are some of them:

Read more ASCII Art signatures

Rss feed of the category

«previous page 7 of 8 next