Browse Source

add function mkdd

pull/1/head
10sr 10 years ago
parent
commit
74546d0dbf
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      shrc

+ 8
- 2
shrc View File

@@ -320,6 +320,7 @@ alias pstree="LANG=C pstree"
alias cp="cp -v" alias cp="cp -v"
alias mv="mv -v" alias mv="mv -v"
alias rm="rm -v" alias rm="rm -v"
alias mkdir="mkdir -v"
alias psaux="ps auxww" alias psaux="ps auxww"
alias q=exit alias q=exit
__safe_alias e3=e3em __safe_alias e3=e3em
@@ -887,6 +888,11 @@ tb(){
mv "$@" "$__tb" mv "$@" "$__tb"
} }


mkdd(){
_d=`date +%Y%m%d-%H%M%S` && \
mkdir -p "$_d"
}

mkcd(){ mkcd(){
if test -z "$1" if test -z "$1"
then then
@@ -904,8 +910,8 @@ mkcd(){


mkcdd(){ mkcdd(){
# make and change date directory # make and change date directory
_d=`date +%Y%m%d-%H%M%S`
mkcd "$_d"
_d=`date +%Y%m%d-%H%M%S` && \
mkcd "$_d"
} }


if test -n "$TMUX" && null type reattach-to-user-namespace if test -n "$TMUX" && null type reattach-to-user-namespace


Loading…
Cancel
Save