Giter Club home page Giter Club logo

Comments (8)

gsamokovarov avatar gsamokovarov commented on September 4, 2024

I'm pretty sure the directory names with apostrophes and the like are handled fine in Jump's JSON database, however, these could be a problem in the shell integrations. What shell are you using?

from jump.

jorgsk avatar jorgsk commented on September 4, 2024

I'm using bash -- but I found out something more about what's the issue here. Jumping to directories with hyphens does actually work when I don't tab-complete the target directory. So if I just type "j search" I do land at the right target even if a parent directory has hyphens. I'd gotten used to tab completing the searches in order to see the full path, and when I do that it doesn't work. I just tested with zsh but I've probably not got it set up right because tab completion didn't do anything there. Completion without tab worked with hyphens in zsh too as for bash.

So I guess the question is if jumping to a directory after tab completion a feature in jump or something bash specific?

from jump.

gsamokovarov avatar gsamokovarov commented on September 4, 2024

It could be the missing escaping when generating the completion hints. Can you try changing this line to:

jump hint $term

jump hint "$term"

You don't need to compile jump, but replace the integration in you bashrc from eval "$(jump shell bash)" to the bash script lines inside of the ` block.

from jump.

jorgsk avatar jorgsk commented on September 4, 2024

My .bashrc contained the lines
eval "$(jump shell)" (from the front page instructions)
When I first tried to change this to
eval "$(jump shell bash)"
I got the same behavior as before.
Further changing this line to
eval "$(jump hint $term)"
does not evaluate well, and I get an error when starting bash. Perhaps I didn't write what you intended?

from jump.

gsamokovarov avatar gsamokovarov commented on September 4, 2024

I'll test it locally and put a build for you to test as well. It will be easier than writing the integration script manually.

from jump.

gsamokovarov avatar gsamokovarov commented on September 4, 2024

I have tested it locally and have a fix for this. Will release a new version of Jump tomorrow with it.

from jump.

jorgsk avatar jorgsk commented on September 4, 2024

Thanks! Will test when out :)

from jump.

gsamokovarov avatar gsamokovarov commented on September 4, 2024

Thank you for bringing this up! This was a security issue as well. If a cleverly named directory existed in you jump database, going to the directory by following the autocompletion could have been dangerous! You can spawn shell commands with the directory name and that's not good. Again, thanks for the notice.

The autocompletion should be fixed for such cases in the new release, 0.40.0. Read the release notes for more details. I have attached a jump_osx OSX binary, because it will take a while for brew to pick up the new release.

from jump.

Related Issues (20)

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.