Skip to content

oscargong/ZSH-Async-Copy-Move-and-Paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ZSH Async Copy Move and Paste

# async copy
function ac() {
    unset ACOPY
    unset AMOVE
    export ACOPY=("${(@f)$(realpath -e $@)}")
}

# async move
function am() {
    unset ACOPY
    unset AMOVE
    export AMOVE=("${(@f)$(realpath -e $@)}")
}

# async paste
function ap() {
    if [ ! -z "$ACOPY" ]; then
        cp -vr "${ACOPY[@]}" .
    elif [ ! -z "$AMOVE" ]; then
        mv -v "${AMOVE[@]}" .
        unset AMOVE
    else
        >&2 echo "clipboard empty"
        return 1
    fi
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages