Giter Club home page Giter Club logo

goto's People

Contributors

andy5995 avatar slai11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

goto's Issues

font color doesn't reset predictably

I installed v0.3.0 from crates.io using rustc 1.45.1 (c367798cf 2020-07-26)

You can see in this image that after I ran goto-rs ls that the font color of the terminal stayed blue until after I ran ls.

``

image

Deprecation messages related to 'home_dir'

These warnings could probably be fixed using the dirs crate. I use dirs for one of my projects at https://github.com/theimpossibleastronaut/oxi-rmw/blob/b1c90d8450e74fbec4a56a8f732d73075574ad3c/src/main.rs#L8

andy@oceanus:~/src/rust/goto$ cargo clippy
warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.
  --> src/db.rs:17:11
   |
17 |     match env::home_dir().map(|p| format!("{}/{}", p.display(), ".config/goto")) {
   |           ^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.
  --> src/db.rs:41:11
   |
41 |     match env::home_dir().map(|p| format!("{}/{}", p.display(), ".config/goto/db.txt")) {
   |           ^^^^^^^^^^^^^

Proposal: New mode of jumping

I'm exploring a new mode of using gt that does not involve typing the shorthand for the destination.

> gg
======= Current Indexed Directories (alias highlighted) =======
   └─ Users
      └─ sylvester
         ├─ Documents
         │  └─ pages [1]
         ├─ go
         │  └─ src
         │     ├─ apiproxy [2]
         │     ├─ bistromath-api [3]
         │     ├─ device-db [4]
         │     └─ playback-streams [5]
         └─ gitlab
            └─ gdk [6]

Select jump target: _

Instead of typing gt glb, we now expose the option to type gg (or any other new alias) + number. This could be useful when working with folders of very similar namespace.

The only concern I have is that this ls tree could get really big. Perhaps beyond a certain size (20?), we should just keep the most-recently-used paths.

This could be broken down into a couple of actionables

  1. New mode for jumping (gg)
  2. Add a -a/--all mode to show all. OR incorporate it with ls.

fix overriding of key-value in index

Adding patha/special_name after pathb/special_name will override the first instance.

special_name,/pathb/special_name

becomes

special_name,/patha/special_name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.