Git Product home page Git Product logo

completest's People

Contributors

adaszko avatar epage avatar modprog avatar nycodeghg avatar pacak avatar peter-kehl avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

completest's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): Update MSRV to v1.77

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
crates/completest-nu/Cargo.toml
  • dunce 1.0.4
  • nu-cli 0.88.1
  • nu-command 0.88.1
  • nu-parser 0.88.1
  • nu-protocol 0.88.1
  • nu-test-support 0.88.1
  • nu-cmd-lang 0.88.1
  • reedline 0.27.1
crates/completest-pty/Cargo.toml
  • ptyprocess 0.4.1
  • vt100 0.15.2
github-actions
.github/workflows/audit.yml
  • actions/checkout v4
  • actions-rs/audit-check v1
  • actions/checkout v4
  • EmbarkStudios/cargo-deny-action v1
.github/workflows/ci.yml
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • github/codeql-action v3
  • actions/checkout v4
  • Swatinem/rust-cache v2
.github/workflows/committed.yml
  • actions/checkout v4
.github/workflows/pre-commit.yml
  • actions/checkout v4
  • actions/setup-python v5
  • pre-commit/action v3.0.1
.github/workflows/rust-next.yml
  • actions/checkout v4
  • Swatinem/rust-cache v2
  • actions/checkout v4
  • Swatinem/rust-cache v2
.github/workflows/spelling.yml
  • actions/checkout v4
regex
Cargo.toml
  • MSRV 1.70.0
.github/workflows/ci.yml
  • STABLE 1.77
  • STABLE 1.77
  • STABLE 1.77

  • Check this box to trigger a request for Renovate to run again on this repository

Clarify API/documentation

Continuing discussion at #6 (comment)

The problem: By construing the home parameter as my actual $HOME directory, I accidentally overwrote the .zshenv file in it because completest creates a file of such a name there unconditionally. I think it’s a papercut that it would be nice to clarify.

The suggested solution:

  1. Deprecate/remove new() because more specific names tend to be more descriptive (IMO, of course).
  2. Rename “home” to “workdir” because it can be confused with an actual home directory and result in overwritten configuration files.
  3. Add a new constructor with_temp_workdir(bin_root) that creates a temporary workdir automatically.
  4. Probably also rename bin_root to something like shell_binary_dir_path.

EDIT: Clarify the problem.

Provide an ability to configure `PS1`

To simplify tests using completest, I'd like to have an ability to set PS1="". Currently I'm forced to take into account the configured prompt (% ) in my assertions.

Can’t get simple zsh completion to work

Hi 👋

I’m on macOS, trying to write a simple test case. This just outputs a bunch of files from the current directory, not bar, as it should have. When I source the completion script from the shell, it works fine.

    #[test]
    fn completest_reduction() {
        let script = r#"
#compdef foo

_foo () {
    compadd bar
    return 0
}
compdef _foo foo
"#;
        let term = completest::Term::new();
        let mut runtime = completest::ZshRuntime::new(PathBuf::from_str("/opt/homebrew/bin/zsh").unwrap(), PathBuf::from_str("./completest-temporary-directory").unwrap()).unwrap();
        runtime.register("foo", &script).unwrap();
        let output = runtime.complete("foo \t", &term).unwrap();
        dbg!(output);
    }
    Running unittests src/main.rs (target/debug/deps/complgen-fd528e5e370143a6)

running 1 test
[src/zsh.rs:404] output = "adaszko@pryk complgen % foo\nCONTRIBUTING.md                  e2e/                             psql.usage\nCargo.lock                       examples/                        psql.zsh\nCargo.toml                       help.usage                       pytest.ini\nLICENSE                          help.zsh                         run-e2e-tests.bash*\nREADME.md                        lsof.bash                        src/\nassets/                          lsof.zsh                         strace.fish\ncapture_postamble.zsh            my.bash                          strace.usage\ncapture_preamble.zsh             my.fish                          strace.zsh\ncargo.fish                       my.usage                         target/\ncompletest-temporary-directory/  my.zsh                           usage/\ndfa.dot                          pgservice.conf                   venv/\ndfa.svg                          proptest-regressions/"
test zsh::tests::completest_reduction ... ok

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.