1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

aliases: replace cdt alias with function

This adds an optional argument to `cdt` to allow specifying the
temporary directory prefix instead of the default `tmp`. This also
shortens the random character string from 10 (GNU mktemp) to 8.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2021-05-25 11:01:14 +00:00
parent 92c8dbc019
commit 4e505c23c6
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -35,7 +35,7 @@ alias al=la # No, I don't need the Mono Assembly Linker
alias md='mkdir -p' alias md='mkdir -p'
alias rd='rmdir -p' alias rd='rmdir -p'
alias -- -='cd -' alias -- -='cd -'
alias cdt='cd `mktemp -d`' cdt() { cd "$(mktemp -d "${1:-tmp}.XXXXXXXX")"; }
alias svi=sudoedit alias svi=sudoedit
alias svim=sudoedit alias svim=sudoedit