malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

dir: Support -color even with minimal output (-m) #50

Closed jstarks closed 4 years ago

malxau commented 4 years ago

Thanks for the cleanup. I was never happy with the multiplicative number of conditions in this code. I'm a bit surprised you wanted these semantics though - are you using dir -m for readability rather than scripting? I've been using sdir as a totally non-scriptable but hopefully more human friendly directory enumerator, which is where all the color code came from.

jstarks commented 4 years ago

Oh cool, I didn't know about sdir, that's quite nice. I was using dir -m -color for a kind of ls equivalent, where I don't want all the metadata.

By the way, is there a .profile/.bashrc equivalent for yori to set up aliases and things?

malxau commented 4 years ago

Everything is controlled via the environment. You have three basic options to configure that:

  1. Modify the system or user environment variables, so it takes effected on all processes.
  2. Use YoriInit.d to store scripts which Yori can run, either on a system wide or per user basis, when it is launched. See http://www.malsmith.net/yori/guide/#script_autoinit . This affects all Yori processes, but not other processes.
  3. Use shortcuts with /k to invoke a shortcut specific initialization script. This allows multiple different types of initialization.

Personally I typically end up doing the third option, because that's what I'd have previously done with CMD.