Code Monkey home page Code Monkey logo

filemanager's Introduction

lines

Basic browser/viewer

$ DIR=`pwd` \
    lines \
        -c 'echo "../"; ls -F --group-directories-first "$DIR"' \
        -k F3:'@ [[ "$TEXT_LEFT" =~ \/$ ]] || less "$DIR/${TEXT_LEFT%[*/=>@|]}"' \
        -s 'DIR=> [[ "$TEXT_LEFT" =~ \/$ ]] && realpath -s "$DIR/${TEXT_LEFT}" || realpath -s "$DIR" \n Update' \
        --title ' $DIR %SPAN' 
        -b --span-separator="" \
$ lines -c ls --title ' Lines: $PWD/$TEXT' -s '@ less $TEXT'
$ ls | lines \
    --size '80%,80%' \
    --theme background:black:black \
    --title 'Lines: $PWD/$TEXT$SELECTED' \
    -s '@ lines "$TEXT" --title "View: ./$TEXT"'
$ ls -alFh --group-directories-first \
    | sed \
        -e '1,2d' \
        -e 's/ *$//' \
        -e 's/^\(.*[0-9]\{2\}:[0-9]\{2\}\) \(.*\)$/\2%SPAN \1/' \
        -e 's/\(%SPAN \)\([^ ]* \)\([^ ]* \)\{3\}/\1\2/' \
    | lines \
        -s '@ [[ "$LEFT_TEXT" =~ \/$ ]] || less "$LEFT_TEXT"' \
        --key Delete:'@ scriots/yesOrNo "Delete: $TEXR_LEFT?" && rm "$TEXR_LEFT" || true' \
        --span-separator="" \
        --title " $TEXT_LEFT %SPAN" \
        -f "lines.go" \
        --border \
        --selection 'grep "\.go"'
$ lines \
    --title 'A question?' \
    -c 'echo -e "YES\nNO"' \
    -r "Fail" \
    -s '> [ "$TEXT" == "YES" ] \n Exit'
if $(lines \
        --title 'A question?' \
        -c 'echo -e "YES\nNO"' \
        -r "Fail" \
        -s '> [ "$TEXT" == "YES" ] \n Exit') ; then
    # user answered yes...
    ...
else
    ...
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.