Difference between revisions of "Bashrc"

From ArchWiki
Jump to navigation Jump to search
(Default command usage: spelling)
Line 15: Line 15:
 
  alias unmount='umount'
 
  alias unmount='umount'
 
  alias pakman='pacman'
 
  alias pakman='pacman'
Seen in orums to force someone to learn vim
+
Seen in forums to force someone to learn vim
 
  alias nano='vi'
 
  alias nano='vi'
 +
 
===Shortcuts===
 
===Shortcuts===
  

Revision as of 23:53, 29 January 2008

A place for Arch users' .bashrc file tips and tricks

PS1

To colourise the bash prompt: Comment out the default PS1:

#PS1='[\u@\h \W]\$ '

The following PS1 is useful for a root bash prompt, with red designation and green console text:

PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\] '

See also this wiki page

Aliases

Default command usage

To make bash prompt for removals

alias rm='rm -i'

To make spelling mistakes not matter

alias unmount='umount'
alias pakman='pacman'

Seen in forums to force someone to learn vim

alias nano='vi'

Shortcuts

Useful environment variables

Set a default text editor

EDITOR=nano
EDITOR=vi

Functions/Scripts

inputrc