Open senekor opened 2 days ago
Here's the features that I implemented for my custom Fish completions:
mutable()
to get the list of completed revisions, while commands which do not mutate the repository will use the revset all()
.-r
or --from
flag, the list of files is read from the given revision.file show, file chmod, interdiff
: List of files in revisioncommit
: List of modified files in working copysplit, squash
: List of modified files in revisionresolve
: List of conflicted files in revisionrestore, untrack
: List of files in revision, or modified files if in working copyjj commit/squash/split <TAB>
works without having to run another jj command first?jj bookmark
and jj git
jj remote
and jj git push
jj undo
and jj operation
Awesome, thank you so much!
Otherwise, the list of files are read from the given working copy.
Is this different from telling the shell to use its built-in file path completion? clap
has some specific hints that don't require dynamic completions. I guess the difference would be the inclusion of gitignored files?
Should we allow snapshotting of the working copy, so that e.g. jj commit/squash/split
works without having to run another jj command first?
I have currently disabled it in my PR. We could allow it for those commands specifically, so we don't incur the performance overhead on commands where it doesn't matter. I have never tried it, but there is the file watcher option for snapshotting too, right? So if users run into performance problems, they could solve it for themselves that way.
Otherwise, the list of files are read from the given working copy.
Is this different from telling the shell to use its built-in file path completion?
clap
has some specific hints that don't require dynamic completions. I guess the difference would be the inclusion of gitignored files?
To clarify, here's the full original statement:
- If the command uses a
-r
or--from
flag, the list of files is read from the given revision.- Otherwise, the list of files are read from the given working copy.
This will allow file completion of paths at a different revision e.g. jj restore --from XXX file[TAB]
can provide a completion if the file doesn't exist in the current working directory but exists in the given revision. Additionally, jj also permits sparse working copies which means that a file might not be checked out in the working directory, but it will still be helpful to do e.g. jj file show file[TAB]
.
Aah, I didn't think about sparse checkouts, that makes sense!
As dynamic completions are being worked on, let's use this issue to gather ideas for possible completions in one place. I'll try to keep the list in the issue description up to date according to the discussion below.
jj bookmark
,jj git
)mutable()
all()
jj squash --into
: revsettrunk()::@
as priority-r
or--from
flag, the list of files is read from the given revision.file show, file chmod, interdiff
: List of files in revisioncommit
: List of modified files in working copysplit, squash
: List of modified files in revisionresolve
: List of conflicted files in revisionrestore, untrack
: List of files in revision, or modified files if in working copyjj remote
andjj git push
jj undo
andjj operation
open questions:
jj commit/squash/split <TAB>
works without having to run another jj command first? places to scrape for ideas and implementation:places to scrape for ideas and implementations:
git