From 84bcbde1a91f0a715d8a3ab6e649e9e704f81309 Mon Sep 17 00:00:00 2001 From: Dom Slee Date: Tue, 11 Apr 2023 22:12:19 +1000 Subject: [PATCH] chore(release): v0.1.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- resource/completions.nu | 77 +++++++++++++++++++++-------------------- tests/testenv/mod.rs | 6 +--- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7d983c0..be51667 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2421,7 +2421,7 @@ checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b" [[package]] name = "posh-tabcomplete" -version = "0.1.3" +version = "0.1.4" dependencies = [ "clap", "diff", diff --git a/Cargo.toml b/Cargo.toml index 81b81d3..3abc145 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "posh-tabcomplete" -version = "0.1.3" +version = "0.1.4" edition = "2021" license = "MIT OR Apache-2.0" description = "Blazing fast tab completion for powershell." diff --git a/resource/completions.nu b/resource/completions.nu index 19df204..3694d61 100644 --- a/resource/completions.nu +++ b/resource/completions.nu @@ -163,6 +163,45 @@ export extern "git cherry-pick" [ --skip # Skip the current commit and continue with the rest of the sequence ] +# List, create, or delete branches +extern "git branch" [ + target: string@"nu-complete git branches" + --env-filter # This filter may be used if you only need to modify the environment + --tree-filter # This is the filter for rewriting the tree and its contents + --index-filter # This is the filter for rewriting the index + --parent-filter # This is the filter for rewriting the commit + --msg-filter # This is the filter for rewriting the commit messages + --commit-filter # This is the filter for performing the commit + --tag-name-filter # This is the filter for rewriting tag names + --subdirectory-filter # Only look at the history which touches the given subdirectory + --prune-empty # Ignore empty commits generated by filters + --original # Use this option to set the namespace where the original commits will be stored + --force(-f) # Filter even with refs in refs/original or existing temp directory + --add # Add to the list of currently tracked branches instead of replacing it + --remotes(-r) # Shows the remote tracking branches + --all(-a) # Show both remote-tracking branches and local branches + --current # Includes the current branch to the list of revs to be shown + --topo-order # Makes commits appear in topological order + --date-order # Makes commits appear in date order + --sparse # Shows merges only reachable from one tip + --no-name # Do not show naming strings for each commit + --sha1-name # Name commits with unique prefix + --no-color # Turn off colored output + --delete(-d) # Delete branch + --force(-f) # Reset branch even if it already exists + --move(-m) # Rename branch + --copy(-c) # Copy branch + --all(-a) # Lists both local and remote branches + --track(-t) # Track remote branch + --no-track # Do not track remote branch + --set-upstream-to # Set remote branch to track + --merged # List branches that have been merged + --no-merged # List branches that have not been merged + --unset-upstream # Remove branch upstream information + --branch(-b) # Specify the branch to use + --default(-d) # Use default branch of the submodule +] + ### FROM AUTOCOMPLETIONS https://github.com/nushell/nu_scripts/tree/main/custom-completions/auto-generate ### Please fix these if they are wrong @@ -502,44 +541,6 @@ extern "git bisect" [ ----term-bad # Print the term for the new state ...args ] -# List, create, or delete branches -extern "git branch" [ - --env-filter # This filter may be used if you only need to modify the environment - --tree-filter # This is the filter for rewriting the tree and its contents - --index-filter # This is the filter for rewriting the index - --parent-filter # This is the filter for rewriting the commit - --msg-filter # This is the filter for rewriting the commit messages - --commit-filter # This is the filter for performing the commit - --tag-name-filter # This is the filter for rewriting tag names - --subdirectory-filter # Only look at the history which touches the given subdirectory - --prune-empty # Ignore empty commits generated by filters - --original # Use this option to set the namespace where the original commits will be stored - --force(-f) # Filter even with refs in refs/original or existing temp directory - --add # Add to the list of currently tracked branches instead of replacing it - --remotes(-r) # Shows the remote tracking branches - --all(-a) # Show both remote-tracking branches and local branches - --current # Includes the current branch to the list of revs to be shown - --topo-order # Makes commits appear in topological order - --date-order # Makes commits appear in date order - --sparse # Shows merges only reachable from one tip - --no-name # Do not show naming strings for each commit - --sha1-name # Name commits with unique prefix - --no-color # Turn off colored output - --delete(-d) # Delete branch - --force(-f) # Reset branch even if it already exists - --move(-m) # Rename branch - --copy(-c) # Copy branch - --all(-a) # Lists both local and remote branches - --track(-t) # Track remote branch - --no-track # Do not track remote branch - --set-upstream-to # Set remote branch to track - --merged # List branches that have been merged - --no-merged # List branches that have not been merged - --unset-upstream # Remove branch upstream information - --branch(-b) # Specify the branch to use - --default(-d) # Use default branch of the submodule - ...args -] # Find commits yet to be applied to upstream [upstream [head]] extern "git cherry" [ --edit(-e) # Edit the commit message prior to committing diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index 5876039..17ff07b 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -27,11 +27,6 @@ pub struct TestEnv { impl TestEnv { pub fn new(shell: &str) -> TestEnv { - assert!( - env::var(TABCOMPLETE_FILE).is_err(), - "if {TABCOMPLETE_FILE} is set, these tests won't work" - ); - let profile_prefix_data = vec![ include_str!("./aliases.ps1"), include_str!("./additionalFns.ps1"), @@ -89,6 +84,7 @@ impl TestEnv { let output = Command::new(&self.shell) .arg("-NoProfile") .arg("-File") + .env_remove(TABCOMPLETE_FILE) .arg(file_path.to_str().unwrap()) .env(PATH, paths_var) .current_dir(root)