josephlai241 / nomad Goto Github PK
View Code? Open in Web Editor NEW๐ณ The customizable next gen tree command with Git integration and TUI.
Home Page: https://josephlai241.github.io/nomad/
License: MIT License
๐ณ The customizable next gen tree command with Git integration and TUI.
Home Page: https://josephlai241.github.io/nomad/
License: MIT License
There are currently two different panes that are related within Rootless mode - the current settings and the available keybindings for each mode. These panes may be toggled with the "s"
and "k"
keys respectively.
This makes the UI feel a little clunky; a friend suggested (thanks @LukeDSchenk) I should merge these two panes to improve the user experience.
Everyone loves a streamlined user interface. Rootless mode already has a bit of a learning curve since it currently (beta) does not support mouse events, ie. clicks and cursor tracking. This means users will have to navigate solely by keybindings. Making it as simple as possible is in everyone's best interest.
N/A
N/A
The only concern I have with merging the two is displaying the keybindings for the Breadcrumbs widget:
Would it still make sense to just hit "s"
when in the Breadcrumbs widget, even though "s"
represents the current settings, to bring up the available keybindings for this widget?
I recently learned some people do not run git push --set-upstream origin <BRANCH_NAME>
when pushing code from a new branch upstream. nomad
currently assumes a user would do this, and displays the number of commits ahead of an upstream branch assuming the user has ran that Git command.
A message "No upstream branch found" is displayed if the user does not run that Git command and runs the nd git status
subcommand.
The "No upstream branch found" message may become annoying for anyone who does not run that Git command to set the upstream branch. I think I should remove this message and only display the number of commits ahead if the user chooses to set the upstream branch.
N/A
N/A
N/A
The --tokei
flag currently displays the number of blank, code, comments, and total number of lines within individual files. It would be nice to also see the total statistics for an entire directory, instead of doing math to figure out this number.
I want to add the ability to display the total number of blank, code, comments, and lines of all files in a given directory next to or underneath that directory as a summary of sorts.
It would just be interesting/useful to see this information.
N/A
N/A
N/A
Empty directories are missing in the tree.
Empty directories absolutely should be included in trees.
nomad
skips over all empty directories.
cd
into a directory containing empty subdirectories (or run mkdir <DIRECTORY_NAME>
and do not add any files into the new directory).nd
to display a tree visual of the directory's structure.
N/A
I need to revisit the ToTree
trait in src/traverse/traits.rs
since this trait is where the tree is built. I think it should (hopefully) be a simple fix once I find where the issue is occurring.
There is currently no way to scroll or expand the Tree (Normal) View within Rootless mode. This may become an issue with longer filenames, deeply nested items, or when displaying file metadata.
I would like to add two different ways to adjust the size of the Tree View:
It would be nice to see everything in the tree.
N/A
N/A
Ideas for the new keybindings:
"F"
for the Tree View to toggle fullscreen/full-width mode."+"
and "-"
for the Tree View to increment/decrement the width of the widget.nomad
currently builds the entire tree before it is displayed in the terminal. While this is not an issue when running nomad
within smaller directories, it becomes substantial when running it in very large directories like /
, for example. After running nd
, it appears the command is hanging but nomad
is actually just building the tree in the background.
Like what the original tree
command appears to do, live-printing the tree as nomad
finds new files or directories would provide a better user experience.
Everyone loves a program that runs fast. Who actually likes waiting, especially for something written in Rust?
The hanging effect after running nd
in big directories in the terminal may also cause confusion for the end user (ie. "did nomad
crash?").
I did not open a separate bug report for this since this is technically not a bug, but rather a performance issue.
I have considered writing my own implementation of a tree-building library; however, I believe ptree
is already a great crate, so why reinvent the wheel?
This is currently just a limitation of the default method of tree building that the ptree
crate offers, since I did not implement a custom TreeItem
trait and just used the provided TreeBuilder
struct and print_tree_with()
function to create and display the tree with custom formatting settings.
I believe this feature may be fulfilled once I take a deeper dive into the inner workings of ptree
. If it is not possible to do by just implementing my own TreeItem
trait, perhaps I would have to modify the source code and maybe even open a pull request for ptree
adding a live print option of some sort when I figure it out. If I do open a PR for ptree
and it is not accepted, I will just have to fork my own version of the crate and include it in nomad
's source code.
Running nd git add
when adding (staging) files on a new branch will not work.
This subcommand should successfully stage a file by modifying the Git index.
nomad
throws an error stating it is unable to stage files and does not modify the Git index.
git checkout
a new branch.nd git add <FILE_OR_DIRECTORY_IDENTIFIER>
.
nomad
is unable to stage the file."Unable to stage files": Error { code: -9, klass: 4, message: "reference 'refs/heads/master' not found" }
According to the error that was returned, I may need to revisit how the Git refs are pulled from a repository.
The nd git status
subcommand should usually display some branch information on top of the tree containing changed files. Running this command on a new branch or a new repository will display an error instead of the branch information.
This subcommand should successfully display branch information and upstream branch information, if applicable.
An error message appears in lieu of the branch information.
git checkout
a new branch or create a new Git repository locally.nd git status
.
Could not get repository HEAD!
# The Git status tree is displayed here.
# ...
# ...
# ...
I need to revisit the git2
crate and figure out a different way, or perhaps how to handle different conditions, to go about extracting branch and upstream branch information from a Git repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.