Closed JayTheMarketer closed 6 years ago
Hey, I don't really have time to do this. But if you get a chance to reimplement what is here for fish shell I will happily link to that version in the docs.
This isn't a perfect solution to this problem (since it has to reload everything every time, it's fairly slow), but if you think of zsh scripts like python/ruby/node scripts, it makes sense:
Define a new function/alias (you can use the builtins funced
and funcsave
) with this in it:
function k --description 'List contents of directory, like ls but better'
zsh -c ". /path/to/supercrabtree/k/k.sh; k $argv"
end
You'll want to make sure there's not much (if anything) in your .profile, .zprofile, and .zshrc so that this is quick (and you'll obviously need zsh installed).
@supercrabtree would you be interested in a PR to add this to the readme?
Again, nowhere near a perfect solution (or really any solution), but...
There is another package implemented via a ruby gem (and therefore shell agnostic) called athityakumar/colorls that provides ls
with fontawesome icons and also includes git status.
My current function is
function k
colorls --long --almost-all --sort-dirs --git-status $argv
end
I know this solves nothing in the long run because I do prefer the real k, but it works in a pinch until we can port it over to fish.
You'll want to make sure there's not much (if anything) in your .profile, .zprofile, and .zshrc so that this is quick (and you'll obviously need zsh installed).
The --no-rcs option (short flag is "-f"), lets you work-around runcoms who haven't been sticking to their diets lately by instructing zsh to parse only the global zshenv and skip all the rest... (There's also a no-glboal-rcs but I find the bloat is usually my own so have little use for it in this context at least.)
@JayTheMarketer If it helps, I've reimplemented k
as a binary (in Nim) which you can build/install from here: http://github.com/OldhamMade/ll
It's not 100% feature complete (some sorting options require some changes in the upcoming release of Nim), but I'm using it on a daily basis on macOS without any problems.
Define a new function/alias (you can use the builtins
funced
andfuncsave
) with this in it:function k --description 'List contents of directory, like ls but better' zsh -c ". /path/to/supercrabtree/k/k.sh; k $argv" end
This worked brilliantly, no fuss, no muss.
would you be open to creating a version (or making the current version) compatible with the fish shell?
i love k and it is the only thing I miss since moving from ZSH to fish.