dotfiles/zsh/modules/alias/init.zsh
James Patrick 3556761ebd Changed how the mktemp trick work.
This way actually has a couple of advantages.

1. With this you write something like $ _ vim file.xml. This is
automatically drop you into a tmp dir then run the vim command.
2. zsh completions aren't still work.
2022-01-05 23:18:14 -05:00

24 lines
523 B
Bash

# ls shortcuts.
if [[ $OSTYPE = darwin* ]] ; then
color_flag="-G"
else
color_flag="--color"
fi
alias ls="ls $color_flag"
alias l="ls -lh $color_flag"
alias la="ls -lha $color_flag"
# Get the most recently modified object in the current directory.
alias lf="ls -1tr | tail -n 1"
alias docker="sudo docker"
alias dc="sudo docker-compose"
# Goes to a temp folder. This will be deleted on restart.
alias _="cd `mktemp -d` ; "
alias :q="exit"
# Because sometimes asking nicely gets things done.
alias please="sudo"