Code: Select all
sh eyes
how true. Confession, there have been times I have to open my alias file to verify the command :)ivanovnegro wrote:
Of course, aliases are exactly for this. I have a full list of them. Though it has one disadvantage, sometimes you forget the real commands. :)
Code: Select all
alias -p
Code: Select all
% which ver
ver: aliased to apt-cache policy
Code: Select all
% alias aka
aka='nano ~/.zsh_aliases'
Great.wuxmedia wrote:^ no need to 'cat ~/ .bash_aliases'
tryCode: Select all
alias -p
Code: Select all
alias
Code: Select all
extract () {
# A check for flags on compressed files.
if [ -f $1 ] ; then
case $1 in
*.tar.bz2)
tar -xvjf $1
;;
*.tar.gz)
tar -xvzf $1
;;
*.bz2)
bunzip2 $1
;;
*.rar)
unrar x $1
;;
*.gz)
gunzip $1
;;
*.tar)
tar -xf $1
;;
*.tbz2)
tar -xvjf $1
;;
*.tgz)
tar -xvzf $1
;;
*.zip)
unzip $1
;;
*.Z)
uncompress $1
;;
*)
echo "$1 is not valid for extraction"
;;
esac
else
echo "$1 is not a valid file"
fi
}
Code: Select all
$ cat > Textfile.txt << EOF
(type your textfile, no need for quotes, or anything. Once finished type;
EOF
Code: Select all
tar -xzvf tarfile
Code: Select all
tar xzvf tarfile
Code: Select all
export MARKPATH=$HOME/.marks
function go {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "no such mark: $1"
}
function mk {
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
}
function unmk {
rm "$MARKPATH/$1"
}
function mks {
ls -o "$MARKPATH" | awk '/^lrw/ { print $8,$9,$10 }'
}
Code: Select all
function _completemarks {
reply=($(ls $MARKPATH))
}
compctl -K _completemarks go
compctl -K _completemarks unmk