Giter VIP home page Giter VIP logo

Comments (2)

austinjones avatar austinjones commented on June 23, 2024

Hi @nothingnesses,
I've thought about this as well. Particularly w/ WD and Command Histories, those could power some really nice fuzzy finder interfaces.

I haven't been able to find a way to access the working directory within the shell though. You can spawn a child process with an initial working directory, but it can change that directory without any visibility. I think it's common to initialize a tab in a project, and cd around within that project dir.

I think commands are a bit easier - those could be monitored in the shell histfile. Definitely agreed, this would be a really nice feature. I need to figure out if it's possible though.

from tab-rs.

nothingnesses avatar nothingnesses commented on June 23, 2024

I haven't been able to find a way to access the working directory within the shell though. You can spawn a child process with an initial working directory, but it can change that directory without any visibility. I think it's common to initialize a tab in a project, and cd around within that project dir.

Maybe std::env::current_dir can somehow be used to extract that? Or if not, then perhaps the $PWD environment variable or pwd shell command can somehow be leveraged instead?

I think commands are a bit easier - those could be monitored in the shell histfile.

I actually think command history would be harder to extract since not all shells record command history (as with dash which is what I use primarily and doesn't record commands by default, unless compiled to have the fc built-in command). Perhaps std::io::Stdin and std:process:Command could instead somehow be used to create a sort of man-in-the-middle that accepts and records shell input commands (or maybe just the last command since that's all we'd probably want) and afterwards passes it on the the actual shell/creates the child process to be ran.

from tab-rs.

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.