People who used to say "duh!" when offering someone a tip?ppurka wrote:eww! Who reads all thatBoneKracker wrote:http://www.amazon.com/How-Win-Friends-I ... 0671723650ppurka wrote:duh!

People who used to say "duh!" when offering someone a tip?ppurka wrote:eww! Who reads all thatBoneKracker wrote:http://www.amazon.com/How-Win-Friends-I ... 0671723650ppurka wrote:duh!
patrix_neo wrote:The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Luckily I don't know what "duh!" means and I think I don't want to knowppurka wrote:duh!Code: Select all
echo "bindkey "^R" history-incremental-search-backward bindkey "^S" history-incremental-search-forward" >> .zshrc . .zshrc
Code: Select all
shopt -s cdspell
shopt -u extdebug
complete -d cd
complete -c which
complete -c man
complete -c killall
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias l='ls -lF --color=always'
alias la='ls -la --color=always'
alias lh='ls -lh --color=always'
alias ll='ls -l --color=always'
alias ls='ls --color=always'
alias lS='ls -lS'
alias c='cd'
alias o='/usr/bin/less'
alias vo='/usr/bin/vim'
alias bi='/usr/bin/vim'
alias vu='/usr/bin/vim'
alias suvi='sudo /usr/bin/vim'
alias xc='/usr/bin/xv'
PS1='\[\033[0;32m\]\u@\h\[\033[0m\]:\[\033[0;36m\]\A\[\033[0m\]:\[\033[1;30m\]${?}\[\033[0m\]:\[\033[1;34m\]\w\[\033[0m\]>\[\033[0m\] '
Code: Select all
function path(){
test -e "$1" && echo "`pwd`/${1}"
}
Code: Select all
eval `cat /etc/DIR_COLORS ~/.dir_colors | dircolors -
I use:tam1138 wrote:Also, using the ":p" option on any potentially-dangerous bash replacement tricks is useful: it prints out the command that WOULD be run and also appends it to your history. That is, if you think you want to run the last command starting with 'r' in your history but don't want to hose yourself before verifying the command:Code: Select all
$ !r:p rm -rf /
Code: Select all
shopt -s histverifyCode: Select all
function del() {
/bin/mv -f "$@" $HOME/.trash/;
}
alias cd='cd -P'
alias ls='ls -F -N --color=tty --time-style="+%Y%m%d:%H%M%S%z"'
alias ll='ls -l'
alias cl='clear; logout'
alias cv='clear; vlock -a'
alias lless='ll -R --color=always | less -r'
## allows 'h emerge -s' without quoting the space
function h() { HISTTIMEFORMAT= history | grep "$*"; }
alias ltrace='ltrace -S -tt -C'
alias strace='strace -s 500 -tt -ff'
alias vim='vim -X -o'
alias bc='bc ~/.bcrc' ## set up default number of decimals, .bcrc contains "scale=4"
alias perl='perl -Mstrict -w'
alias pf='perldoc -f'
alias pd='perldoc'
alias pq='perldoc -q'
alias xev='xev | grep keycode'
function rmoz() {
## ripped from https://bugzilla.mozilla.org/attachment.cgi?id=151958
## which appears in https://bugzilla.mozilla.org/show_bug.cgi?id=246168
if [ "$1" ]; then
if [ -f "$PWD/$1" ]; then
LOCAL="file://$PWD/$1"
elif [ -f "$1" ]; then
LOCAL="file://$1"
else
LOCAL="$1"
[[ $LOCAL =~ ^http:// ]] || LOCAL="http://$LOCAL"
fi
DISPLAY=:0 mozilla -remote "openurl($LOCAL,new-tab)"
fi
}
## show version of specified perl modules
function pmver() { perl -le "eval { require ${1} } and print qq{${1}: },\$${1}::VERSION or print qq{${1}: none}"; }
function ls-() { ls -"$@"; }Code: Select all
export HISTCONTROL=ignoredups:erasedups
export HISTIGNORE="date:df:fg:jd:jobs:ll:ls"
export HISTTIMEFORMAT="%Y%m%d:%H%M%S%z"
export IGNOREEOF=1
export LESS='-c -h1 -y1 -j2 -S'
export LESS="$LESS -P B%bt-%bB?B/%B.?pt(%pt\%). ?ltL%lt-%lb.?L/%L.?Pt(%Pt\%). .?f%f:-.?e (END).?m (file %i of %m).%t"
unset LESSOPEN ## hate this
## use with 'ps -eH' or 'ps -e f'
export PS_FORMAT="pid,pgid,euid,egid,nlwp:2=NT,ni:2,rtprio:2=RT,cls:2,vsz:6,rss:6,pcpu,pmem,stat:3=ST,tname:6,stime,bsdtime,args"
export TIMEFORMAT=$'\nreal: %3R, user: %3U, sys: %S'
export TMPDIR=~/tmp
export TMP=$TMPDIR
unset PERL5LIB;
DIRS=(~/em/perl-modules/{lib,share}/perl/*);
local IFS=":";
export PERL5LIB="${DIRS[*]}";Code: Select all
shopt -s cdable_vars checkhash checkwinsize cmdhist extquote histappend histreedit histverify
shopt -u force_fignore
if [[ "`tty`" =~ ^/dev/tty ]]; then ## things for console only
setterm -blength 10 -bfreq 10000 ## barely hearable, prevents waking up people
fiCode: Select all
set horizontal-scroll-mode off
## 'audible' or 'visible'
set bell-style audible
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off
set history-preserve-point on
set editing-mode vi-command
set keymap vi-command
set page-completions off
set visible-stats on
## todo: yank-nth-arg
## todo: yank-last-argCode: Select all
"xkbcomp /home/hue/.hue-xkb/es-qwerty-hue :0"
control+F1
"xkbcomp /home/hue/.hue-xkb/es-dvorak-hue :0"
control+F2
"xwd -root -silent | convert xwd:- png:/home/hue/xwd-$(date +%Y%m%d:%H%M%S.png)"
Printdub.wav wrote:Code: Select all
alias currentip='set `/sbin/ifconfig eth0` && echo ${7#*:}'
Code: Select all
%<job ID>Code: Select all
jobsCode: Select all
<command> &Code: Select all
if [ $SHLVL -eq 1 ]; then
/usr/bin/screen -xRR
fiCode: Select all
eview() {
FILE=$(equery which $1)
if [ -f "$FILE" ]; then
view $FILE
fi
}
Code: Select all
echo "some configuration" >> /etc/somefileCode: Select all
echo "some configuration" > /etc/somefileCode: Select all
# echo "something something" > /etc/passwdCode: Select all
set -o noclobberCode: Select all
# echo "a bunch of crap" > /etc/passwd
-su: /etc/passwd: cannot overwrite existing fileCode: Select all
$ :>| $HOME/.xsession-errorsCode: Select all
# With -p, Paludis should have normal niceness
# Else, it should be extremly friendly
function paludis(){
if echo $@ | egrep '\-.*p\ ' > /dev/null; then
/usr/bin/paludis $@
else
nice -n19 /usr/bin/paludis $@
fi
}Code: Select all
# For the really bullish processes
function murder(){
while [[ $? = 0 ]]; do
kill -9 $@
done
}
Code: Select all
PS1='\w \u$(r=$?; test $r -ne 0 && echo " \[\e[1;31m\]ret:$r")\e[0m\] \$ 'This is once more an example why it is wiser to use zsh as the interactive shell. There you can just include %? or (for analogous behaviour to your case) %(?||ret:%?) within PS1 (coloring omitted for simplicity). Or even simpler and IMHO more convenient for daily usage: setopt print_exit_value.notHerbert wrote:A bash command prompt that prints the return value in the prompt
Code: Select all
function wi() { vi $(equery which $@) Code: Select all
function usegrep() { grep $@ /var/repos/*/profiles/use.* }Code: Select all
function bugz() { if [[ $1 == get ]]; then =bugz $@ | less; else =bugz $@; fi }I don't have a var/repos dir on my system. Are you talking about /usr/portage/profiles/use.desc?a.b. wrote:Code: Select all
function usegrep() { grep $@ /var/repos/*/profiles/use.* }
I've put the stuff in more logical places:Dralnu wrote:I don't have a var/repos dir on my system. Are you talking about /usr/portage/profiles/use.desc?a.b. wrote:Code: Select all
function usegrep() { grep $@ /var/repos/*/profiles/use.* }
Code: Select all
# Folders
REPODIR="/var/repos"
PORTDIR="$REPODIR/gentoo"
PORTDIR_OVERLAY="$REPODIR/local $REPODIR/imported"
source "/var/repos/.layman/make.conf"
DISTDIR="/var/cache/distfiles"Code: Select all
PS1='\[\033[01;32m\]\u@\[\033[01;31m\]\h[\w]:`if [[ $? != 0 ]]; then echo "( "; else echo ") "; fi`\[\033[00m\]'Code: Select all
user@host[~]:) /bin/true
user@host[~]:)Code: Select all
user@host[~]:) /bin/false
user@host[~]:( 
HAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAloudmax wrote:Here's my prompt string:If the previous command succeeds it shows me it's happy:Code: Select all
PS1='\[\033[01;32m\]\u@\[\033[01;31m\]\h[\w]:`if [[ $? != 0 ]]; then echo "( "; else echo ") "; fi`\[\033[00m\]'If the previous command fails, it's sadCode: Select all
user@host[~]:) /bin/true user@host[~]:)Code: Select all
user@host[~]:) /bin/false user@host[~]:(
Code: Select all
alias ghistory="history | grep"
alias gh="ghistory"