diff options
author | Vittorio G (VittGam) <github@vittgam.net> | 2016-05-12 18:24:49 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-05-14 16:53:10 +0200 |
commit | d742e1b5137d63175f4c41a4cb357cbe358112ef (patch) | |
tree | 47b8e910af504789d3313dbb247bac24080dfb4a /package/base-files/files/etc | |
parent | 424a94d81a5ff90e626a38517661795297f62274 (diff) | |
download | upstream-d742e1b5137d63175f4c41a4cb357cbe358112ef.tar.gz upstream-d742e1b5137d63175f4c41a4cb357cbe358112ef.tar.bz2 upstream-d742e1b5137d63175f4c41a4cb357cbe358112ef.zip |
base-files: Enhancements to /etc/profile
- Update the terminal window title with the current directory and hostname, if using an xterm-compatible terminal emulator.
- Add ll, an useful alias to ls.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
Diffstat (limited to 'package/base-files/files/etc')
-rw-r--r-- | package/base-files/files/etc/profile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index ad8fe12b66..f2def7fc0b 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -11,9 +11,13 @@ export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) export HOME=${HOME:-/root} export PS1='\u@\h:\w\$ ' +[ "$TERM" = "xterm" ] && export PS1='\[\e]0;\u@\h: \w\a\]'$PS1 + [ -x /bin/more ] || alias more=less [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi +alias ll='ls -alF --color=auto' + [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } |