Project

General

Profile

Bug #1159

Shell completions are partly broken

Added by Mark Abraham over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
core library
Target version:
Affected version - extra info:
all pre-5.0 versions (depending on issue)
Affected version:
Difficulty:
uncategorized
Close

Description

Generation of shell completion files seems to be somewhat broken for (at least) inputs that accept multiple filenames / directories.

There's some information & discussion https://gerrit.gromacs.org/2188, but mostly things are not broken enough to warrant fixing (and it's such minor convenience functionality, anyway).


Related issues

Related to GROMACS - Feature #1410: Future of shell completions Closed 12/27/2013

Associated revisions

Revision ca99be56 (diff)
Added by Mark Abraham over 4 years ago

Update shell completions

There's some strange changes of what completions are being generated
for inputs that take multiple files when generated by different 4.6.x
versions, but nobody seems to know what is going on. Also, those
problems do not have a large impact.

Refs #1159

Change-Id: Ib4b1ad4999e1b68904d46b0d01c2a5dd07507fd7

Revision c1496fd0 (diff)
Added by Mark Abraham about 4 years ago

Update shell completions

There's some strange changes of what completions are being generated
for inputs that take multiple files when generated by different 4.6.x
versions, but nobody seems to know what is going on. Also, those
problems do not have a large impact.

Refs #1159

Change-Id: Ib4b1ad4999e1b68904d46b0d01c2a5dd07507fd7

Revision 0d31fa51 (diff)
Added by Teemu Murtola over 3 years ago

Fixes to filename shell completions

- When completing a file name, don't add a space after a directory name
has been completed.
- Don't exclude directory names starting with . from the completions.
This also excludes ../foobar/.
- Use a more reasonable pattern to match the file names: expect exactly
one of the acceptable extensions, and at most one .gz/.Z extension.
- Complete directory names for mdrun -multidir.

Issues that remain:
- Completions for paths that contain spaces doesn't really work.
The only difference to earlier behavior is that now, completing
something that starts with a " gets an appended space before the
closing ".
- When completing to subdirectories, the list of possible completions
shows the subdirectory for each alternative. This doesn't happen with
standard bash completion. Not sure whether this is feasible to fix.

Part of #1410 and #1159.

Change-Id: I1aff3ab89419e0ed4b53bc998c9a50b9a1879e9c

Revision e8d1bac3 (diff)
Added by Teemu Murtola over 3 years ago

Fix shell completions of ffMULT options

Now file names for options with ffMULT set are completed also after one
file name has already been provided.

Fixes #1159, related to #1410.

Change-Id: I1f4f0b6a5817ce3193a0195d1cb4a2491c397593

History

#1 Updated by Teemu Murtola over 3 years ago

#2 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #1159.
Uploader: Teemu Murtola ()
Change-Id: I1aff3ab89419e0ed4b53bc998c9a50b9a1879e9c
Gerrit URL: https://gerrit.gromacs.org/3037

#3 Updated by Teemu Murtola over 3 years ago

  • Subject changed from shell completions are partly broken to Shell completions are partly broken
  • Category set to core library
  • Status changed from New to In Progress
  • Assignee set to Teemu Murtola
  • Target version changed from future to 5.0
  • Affected version - extra info set to all pre-5.0 versions (depending on issue)
  • Affected version set to 4.6

#4 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #1159.
Uploader: Teemu Murtola ()
Change-Id: I1f4f0b6a5817ce3193a0195d1cb4a2491c397593
Gerrit URL: https://gerrit.gromacs.org/3049

#5 Updated by Teemu Murtola over 3 years ago

  • Status changed from In Progress to Fix uploaded
Linked changes should fix all the issues that were discussed in the change mentioned in the description.
  • -multidir is now completed to directories instead of some random file names
  • file name completion after an option that is declared with ffMULT now works also for other files than the first one after the option name

The issue with -multidir completions being generated differently for different versions in 4.6 was fixed earlier by an unrelated change: it was most likely caused by accessing the empty extension string as ext + 1 in ftp2ext/similar, which essentially gave pointer to a random memory area. So the results depended on the compiler used and all the other code that influenced how the strings happened to be laid out in memory.

#6 Updated by Teemu Murtola over 3 years ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Teemu Murtola over 3 years ago

  • % Done changed from 0 to 100

#8 Updated by Teemu Murtola over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF