* Implement exclusive and inclusive ranges with .. and ..=
This commit adds right-exclusive ranges.
The original a..b inclusive syntax was changed to reflect the Rust notation.
New a..=b syntax was introduced to have the old behavior.
Currently, both a.. and b..= is valid, and it is unclear whether it's valid
to impose restrictions.
The original issue suggests .. for inclusive and ..< for exclusive ranges,
this can be implemented by making simple changes to this commit.
* Fix collect tests by changing ranges to ..=
* Fix clippy lints in exclusive range matching
* Implement exclusive ranges using `..<`
Previously, we weren't expanding `~`, so `std::fs::metadata` was failing. We now
make use of `PathSuggestion` to get the actual path, as represented by a
`PathBuf`.
* remove unused dependencies
* moved umask to cfg(unix)
* changed Inflector to inflector, hoping it fixes the issue.
* roll back Inflector
* removed commented out deps now that everything looks good.
* First commit updating `config` to use subcommands (#2119)
- Implemented `get` subcommand
* Implmented `config set` as a subcommand.
* Implemented `config set_into` as subcommand
* Fixed base `config` command
- Instead of outputting help, it now outputs the list of all
configuration parameters.
* Added `config clear` subcommand
* Added `config load` and `config remove` subcommands
* Added `config path` subcommand
* fixed clippy
* initial commit for implementing groups
* each group works
* each group is slightly cleaner + added example
* Added `each window` subcommand
- No support for stride flag yet
* each window stride implemented
* Added tests and minor documentation changes
* fixed clippy
* fixed clippy again
Previously, we'd check for a `~/` prefix and then return the home directory as
the base `PathBuf`. We failed to consider pushing any of the other possible path
components into this base dir, which prevent completions more than one level
deep (for example, `~/.config/<TAB>` would fail).
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* clean up some comments
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* added weather symbols/chars
Although convenient, since the user doesn't have to type the space, it could be
a little surprising to users since they may think that was the only completion
in certain completions modes (for example, `cycle`).
* fixed: .*.(ext|*)
* ls **/* does not return hidden files without the -a flag
* fixed formatting
* fixed clippy issues
* fixed clippy issues, v2
* added `#[cfg(unix)]` to windows-failing test
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* ensure ansi mode is enabled on windows
ansi mode sometimes gets out of sync in Windows.
I'm not sure why but this appears to fix it.
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* shouldn't these both bet clipboard-cli?
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* fixed bug where no config.toml or not set settings made weird defaults.
* clippy & fmt again
* Header default alignment is left.
Co-authored-by: Andrés N. Robalino <andres@androbtech.com>
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* merges
* some info on how to set colors
* WIP - compiling but not working
* semi-working
* making progress
* working except for table lines
* fmt + clippy
* cleaned up some comments
* working line colors
* fmt, clippy, updated sample config.toml
* removed extra comments
* Use the cursor position for the span when between locations.
This fixes a bug where completing
ls <TAB>
would result in replacing the entire line.
* Revert to the default update implementation.
Replacing the length of the elected value was intended to do replacement when
one moves inside a quote. The problem is that a long elected suggestion could
replace bits of a pipeline that are after the cursor. For example:
ls <TAB> | get name | str collect
We ensure the partially cimpleted item doesn't include the end quote. We also
ensure that the appropriate span is replaced, not just the suggested position up
to the cursor position.
- Ensure quotes surround suggestion replacement when there are spaces.
- Ensure an appropriate quote character is chosen based on other quoting
characters being in the suggestions.
Previously, we used rustyline's filename completer. This allowed us to make
progress on the completion engine without building all the parts at once. We now
need our own filename completer to make progress.
The primary driver to having our own filename completer is that it can better
integrate with our path constructs. For example, if we have
> ls .../<TAB>
we want to show a list of suggestions that includes all files two directories up
from the current working directory. The least jarring experience to a user would
be to maintain the three dots. The easiest way for us to do this is by building
our own completer and path constructs.
Doing 'cd .' or an equal command used to modify the prompt: It appended an './' and was even
repeatable, leading to strange prompts (believe me, I tested it for too long).
This fixes#2432