Dhop 2.0.2: Command-line completion (finally!) π
Dhop has been updated 2.0.2 and finally gets command-line completion!
Way back in 2013, I logged an issue for Dhop requesting command-line completion. 13 years and some months later, it finally arrives in Dhop 2.0.2!
Now that I've ported Dhop to Rust, I'm also finally getting around to fixing some things that I've left for too long...
Setting up completion π
Once you have installed dhop, you can set up command-line completion for your shell in two
steps:
Run the
shell-completioncommand:dhop shell-completionWhen you run the command, it will install the shell completion script, report what it did, and give you the next step:
Generating completion script:
'/home/username/.local/share/dhop/dhop.bash'To use it, 'source' the file in your current session, or from your shell initialization script:source "/home/username/.local/share/dhop/dhop.bash"As the output suggests, source the file from your shell initialization script (
.bashrc,.zshrc, etc.) by editing the file and adding the printedsourceline to it. You'll need to restart your shell to see the completions in action.You can also just run the
sourcecommand in your current shell session, but the completions won't be available after you close it unless you also add them to your shell init script.
Other updates π
Additional updates have been made since my initial Rust port, which are included in this version:
The
listcommand now prints the list of locations, the marked path, and the stack as it used to beβin plain text. If you want the JSON-formatted version of this info, you can use the new--jsonflag to do it.Help text has been improved overall to be easier to understand, more complete, and more helpful.
The versions of all dependencies has been updated. Version/dependency information is now provided in the
Cargo.lock <https://github.com/Abstrys/dhop/blob/main/Cargo.lock>file.Under the hood, I've fixed a number of issues with my original Rust code to make it more "rusty", including better error handling throughout, and replaced use of the
jsoncrate withserde_json, which allows me to use strongly-typed values instead of the original implementation's text-only representation of the data.
Official archives for Linux π
I've also made some "official" (meaning that I built, packaged, and am serving) archives for Dhop in
.tar.gz, .tar.bz2, and .zip format for Linux. Here are the latest versions as of today:
Information about how to install using these archives is in the Dhop project README, here:
Installing Dhop on other platforms π
To install Dhop on platforms for which there's no official archive, it can be built from source using the information on the Dhop project README, here:
