Coder Social home page Coder Social logo

It is too slow. about k HOT 3 CLOSED

kuoe0 avatar kuoe0 commented on July 25, 2024
It is too slow.

from k.

Comments (3)

supercrabtree avatar supercrabtree commented on July 25, 2024 1

Hello, I don't see the point in having the --no-vcs flag on by default. That is basically k's killer feature. Outside of a git repo it looks inside each directory listed and if it's a repo decorates the status of that repo to the output of ls. k is slow because git is slow, if you don't need the git stuff just use ls -la

from k.

GSI avatar GSI commented on July 25, 2024

The --no-vcs option speeds up things significantly. IMO the following should actually be done by k by default (PR, anyone?), but for now I just made a wrapper function:

how_k_should_do_this_by_default () {                                                                                                                                                                     
        git rev-parse --is-inside-work-tree &> /dev/null && k $@ || k --no-vcs $@
}
alias l='how_k_should_do_this_by_default'

This uses --no-vcs whenever we are not in a Git directory. (Run from within Git directories it will still use the slow but more detailled variant.)

from k.

GSI avatar GSI commented on July 25, 2024

Just realized that the above function would need to be adapted as to have the git command work on the directories we're actually inspecting. Currently it only looks at $PWD while $@ might be some faraway dir(s).

from k.

Related Issues (20)

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.