Skip to content

Commit

Permalink
Add more Icons, ability to color icons and more (#951)
Browse files Browse the repository at this point in the history
* added better icons from fzf && color

* added options, short dirs

* support fzf output
improve shortening
made file-name white colour

* args & print_with_symbol refactoring

* add substitution flag

* fixed tests
simplified File with regex

* added --align

* cargo fmt

* Move the File fields to private and expose them through functions

* Ok get the simple methods working off PathBuf, still some todo! to fix though

* Oh some of these were easy, now for the big one up next!

* Refactor this method to use more things from PathBuf, namely the '.components()' iterator

* Fix a bug in my impl

* Fix a bug in my short_dir impl where we were including the file path, plus we weren't adding the right / back to the end

* Fix bug in the reverse where I wasn't using the right symbol

* Just some cleanup. I think we can operate right on the slices instead of making an iter here

* Remove the FileColouts and FileIcon trait and use FileExtensions directly

This refactor is mostly so that we don't need to create instances of `FileExtensions`

This struct is more just a collection of functions, so it didn't make sense
to create an instance of it.
I might even remove the struct entirely in the future, and just have these be
free functions that live in a module

* Do some refactoring in the other files, think I'm running out of steam for the evening at least

* Saved is_dir in File for reusing
Folders should ends with `/`
Refactored short_path

* cargo fmt

* removed extra unavailable compare RootDir

---------

Co-authored-by: Corey Alexander <[email protected]>
  • Loading branch information
Shuraken007 and coreyja authored Jan 20, 2024
1 parent ebcf27d commit 627f4d0
Show file tree
Hide file tree
Showing 17 changed files with 1,325 additions and 322 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/<executable file>",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"cSpell.words": [
"devicon",
"dirshort",
"dirshortreverse",
"iconcolor",
"iconify",
"nameshort",
"nodir"
]
}
Loading

0 comments on commit 627f4d0

Please sign in to comment.