tmp : add tmp.
This commit is contained in:
parent
cc0158fed3
commit
f9523f27f2
|
@ -631,6 +631,12 @@ Command|Description
|
|||
---|---
|
||||
`tsize`|Prints terminal size.
|
||||
|
||||
## Tmp.
|
||||
|
||||
Command|Description
|
||||
---|---
|
||||
`tmp`|CD into host's primary tmp dir.
|
||||
|
||||
## Tmux.
|
||||
|
||||
Command|Description
|
||||
|
|
17
.config/bash/module/tmp.sh
Normal file
17
.config/bash/module/tmp.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
# CD into host's primary tmp dir.
|
||||
tmp()
|
||||
{
|
||||
local host="${HOSTNAME}"
|
||||
local tmp_path
|
||||
|
||||
case "${host}" in
|
||||
"desktop"|"home")
|
||||
tmp_path="/var/mnt/storage/hot/tmp"
|
||||
;;
|
||||
*)
|
||||
tmp_path="${HOME}/tmp"
|
||||
;;
|
||||
esac
|
||||
|
||||
cd "${tmp_path}"
|
||||
}
|
Reference in a new issue