:$ echo Niels >
Ctrl-Space : Fails
:$ !
Ctrl-Space : Fails
Below are some more test cases that auto-complete is not able to handle, or, behaves differently than bash.
In test cases below, <TAB> means pressing the TAB key.
(1) command pipeline:
prompt$ ls | <TAB>
prompt$ ls | cat <TAB>
Execution of above commands generates an exception:
java.lang.ClassCastException: com.aquafold.datastudio.tools.shell.bash.execution.ListExecutionNode cannot be cast to com.aquafold.datastudio.tools.shell.bash.execution.SimpleCmdExecutionNode
at com.aquafold.datastudio.tools.shell.assist.ShellAutocomplete.newCollectCandidates(ShellAutocomplete.java:1103)
at com.aquafold.datastudio.tools.shell.assist.ShellAutocomplete.autoComplete(ShellAutocomplete.java:96)
at com.aquafold.datastudio.tools.shell.FluidEditor.onAutoComplete(FluidEditor.java:844)
at com.aquafold.datastudio.tools.shell.FluidEditor.processTabRequest(FluidEditor.java:1578)
(2) command list:
prompt$ ls ; cat <TAB>
Execution of above command generates the same exception as case (1).
(3) ~ auto-completion
(3-1) prompt$ ls ~<TAB>
(3-2) prompt$ ls ~ <TAB>
(3-3) prompt$ ls ~a<TAB>
In fluid shell, above commands generate nothing.
On UNIX, for case 3-1 (no space between ~ and <TAB>), a list of users is displayed (retrieved from /etc/passwd). If user's home directory does exist on the system (/etc/passwd has a column for this), then a file separator is appended to that user's name.
On UNIX, for case 3-2 (there is a space between ~ and <TAB>), the list of files under the working directory is displayed.
On UNIX, case 3-3 is similar to case 3-1, all of users with name starts with letter 'a' is displayed.
(4) ~/ auto-completion on Windows
prompt$ ls ~/<TAB> then select a file from the popup window
Execute above on Windows, fluid shell generates an absolute path with backslash as the file separator; backslash should be replaced with forward slash.
(5) relative path auto-completion
(5-1) prompt$ cd to-a-test-directory
(5-2) prompt$ mkdir a_new_dir
(5-3) prompt$ cd a_new_dir
(5-4) prompt$ echo 1 > new_file_1
(5-5) prompt$ ls ../a_new_di<TAB>
(5-6) prompt$ ls ../a_new_dir/new_<TAB>
(5-7) prompt$ ls ../..<TAB>
(5-8) prompt$ ls ../../<TAB> then select a file from the popup window
Execute above commands in fluid shell on Windows, the result will be:
(5-5) gets expanded to \; this is incorrect, on UNIX, result is ../a_new_dir/
(5-6) gets expanded to new_file_1; this does not confirm UNIX behavior. On UNIX, the result is ../a_new_dir/new_file_1
(5-7) does nothing in Fluid Shell; on UNIX, this gets expanded to ../../
(5-8) gets expanded to an absolute path; this does not confirm UNIX behavior. On UNIX, the result is ../../selected-file-name
(6) \ as file separator on Windows
In test cases (4) and (5-8) above, \ is used as file separator on Windows, should be replaced with forward slash. Another simple test case is:
prompt$ cd a-name-of-director-that-does-exit<TAB>
Execute above command on Windows, the result is
cd a-name-of-director-that-does-exit\
note that a backslash is appended, should use forward slash.
Verified using ADStudio 12 RC 1 the cases mentioned by Fung, both on Windows and Ubuntu.
(1) & (2)
for the case
$ ls | TAB
and the case
$ ls ; TAB
the exception is no longer thrown, however the Autocompletion window pop-ups while it shouldn't
for the other two cases
$ ls | cat TAB
and
$ ls ; cat TAB
the exception is no longer thrown, however if a folder is involved and part of it's name is typed before pressing the TAB key, the end-slash is not added, example:
$ ls | ls folder_naTAB
gets expanded to
$ ls | ls folder_name
instead the expected
$ ls | ls folder_name/
(3) ~ auto-completion
in FluidShell those commands still don't generate anything
(4) ~/ auto-completion on Windows
still an absolute path with backslash is generated
(5) relative path auto-completion
(5-5) now gets expanded to ../a_new_dir --- however it should be with an end-slash ../a_new_dir/
(5-6) OK
(5-7) still nothing happens in FS, it should become ../../
(5-8) OK
(6) \ as file separator on Windows
OK
Verified using ADStudio 12 RC 1 the cases mentioned by Fung, both on Windows and Ubuntu.
(1) & (2)
for the case
$ ls | TAB
and the case
$ ls ; TAB
the exception is no longer thrown, however the Autocompletion window pop-ups while it shouldn't
for the other two cases
$ ls | cat TAB
and
$ ls ; cat TAB
the exception is no longer thrown, however if a folder is involved and part of it's name is typed before pressing the TAB key, the end-slash is not added, example:
$ ls | ls folder_naTAB
gets expanded to
$ ls | ls folder_name
instead the expected
$ ls | ls folder_name/
(3) ~ auto-completion
in FluidShell those commands still don't generate anything
(4) ~/ auto-completion on Windows
still an absolute path with backslash is generated
(5) relative path auto-completion
(5-5) now gets expanded to ../a_new_dir --- however it should be with an end-slash ../a_new_dir/
(5-6) OK
(5-7) still nothing happens in FS, it should become ../../
(5-8) OK
(6) \ as file separator on Windows
OK
I was under impression that tilde only works with a trailing slash.
ls ~/
I have tested this on OS X and Ubuntu without a slash and it shows some list if user accounts.
So if you try ls or cd ~/ in FluidShell it should work.
Let me know.
I was under impression that tilde only works with a trailing slash.
ls ~/
I have tested this on OS X and Ubuntu without a slash and it shows some list if user accounts.
So if you try ls or cd ~/ in FluidShell it should work.
Let me know.
I am use to ~ been evaluated to the USERHOME directory in all OS systems where ~/ would give you the list of the file/folders in the USERHOME directory, but I could live with ~/ working and ~ interpreted litaral
I am use to ~ been evaluated to the USERHOME directory in all OS systems where ~/ would give you the list of the file/folders in the USERHOME directory, but I could live with ~/ working and ~ interpreted litaral
Verified using ADStudio 12 RC 22.
(1) & (2)
Cases:
$ ls | TAB
and
$ ls ; TAB
fixed.
For the other two cases:
$ ls | cat TAB
and
$ ls ; cat TAB
the previously mentioned problem was fixed,
however now the pop-up window in certain situations displays suggestions from the commands list.
Example:
$ mkdir an_example
$ ls | ls aTAB
The pop-up window now displays the commands starting with a.
(3) ~ auto-completion
No change since last time, in FluidShell those commands still don't generate anything.
(4) ~/ auto-completion on Windows
OK, now a forward slash is used.
(5) relative path auto-completion
OK, all fixed.
Verified using ADStudio 12 RC 22.
(1) & (2)
Cases:
$ ls | TAB
and
$ ls ; TAB
fixed.
For the other two cases:
$ ls | cat TAB
and
$ ls ; cat TAB
the previously mentioned problem was fixed,
however now the pop-up window in certain situations displays suggestions from the commands list.
Example:
$ mkdir an_example
$ ls | ls aTAB
The pop-up window now displays the commands starting with a.
(3) ~ auto-completion
No change since last time, in FluidShell those commands still don't generate anything.
(4) ~/ auto-completion on Windows
OK, now a forward slash is used.
(5) relative path auto-completion
OK, all fixed.
Niels will decide what to do about autocompletion for ~ without trailing slash.
Niels will decide what to do about autocompletion for ~ without trailing slash.
Issue #7526 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
3 issue links |
is required by #7221
Issue #7221! and autocomplete gives an exception in view log |
is required by #7071
Issue #7071Autocompletion for files after output redirection |
relates to #7730
Issue #7730Autocompletion for ~ (tilde) without trailing slash |
Below are some more test cases that auto-complete is not able to handle, or, behaves differently than bash.
In test cases below, <TAB> means pressing the TAB key.
(1) command pipeline:
prompt$ ls | <TAB>
prompt$ ls | cat <TAB>
Execution of above commands generates an exception:
java.lang.ClassCastException: com.aquafold.datastudio.tools.shell.bash.execution.ListExecutionNode cannot be cast to com.aquafold.datastudio.tools.shell.bash.execution.SimpleCmdExecutionNode
at com.aquafold.datastudio.tools.shell.assist.ShellAutocomplete.newCollectCandidates(ShellAutocomplete.java:1103)
at com.aquafold.datastudio.tools.shell.assist.ShellAutocomplete.autoComplete(ShellAutocomplete.java:96)
at com.aquafold.datastudio.tools.shell.FluidEditor.onAutoComplete(FluidEditor.java:844)
at com.aquafold.datastudio.tools.shell.FluidEditor.processTabRequest(FluidEditor.java:1578)
(2) command list:
prompt$ ls ; cat <TAB>
Execution of above command generates the same exception as case (1).
(3) ~ auto-completion
(3-1) prompt$ ls ~<TAB>
(3-2) prompt$ ls ~ <TAB>
(3-3) prompt$ ls ~a<TAB>
In fluid shell, above commands generate nothing.
On UNIX, for case 3-1 (no space between ~ and <TAB>), a list of users is displayed (retrieved from /etc/passwd). If user's home directory does exist on the system (/etc/passwd has a column for this), then a file separator is appended to that user's name.
On UNIX, for case 3-2 (there is a space between ~ and <TAB>), the list of files under the working directory is displayed.
On UNIX, case 3-3 is similar to case 3-1, all of users with name starts with letter 'a' is displayed.
(4) ~/ auto-completion on Windows
prompt$ ls ~/<TAB> then select a file from the popup window
Execute above on Windows, fluid shell generates an absolute path with backslash as the file separator; backslash should be replaced with forward slash.
(5) relative path auto-completion
(5-1) prompt$ cd to-a-test-directory
(5-2) prompt$ mkdir a_new_dir
(5-3) prompt$ cd a_new_dir
(5-4) prompt$ echo 1 > new_file_1
(5-5) prompt$ ls ../a_new_di<TAB>
(5-6) prompt$ ls ../a_new_dir/new_<TAB>
(5-7) prompt$ ls ../..<TAB>
(5-8) prompt$ ls ../../<TAB> then select a file from the popup window
Execute above commands in fluid shell on Windows, the result will be:
(5-5) gets expanded to \; this is incorrect, on UNIX, result is ../a_new_dir/
(5-6) gets expanded to new_file_1; this does not confirm UNIX behavior. On UNIX, the result is ../a_new_dir/new_file_1
(5-7) does nothing in Fluid Shell; on UNIX, this gets expanded to ../../
(5-8) gets expanded to an absolute path; this does not confirm UNIX behavior. On UNIX, the result is ../../selected-file-name
(6) \ as file separator on Windows
In test cases (4) and (5-8) above, \ is used as file separator on Windows, should be replaced with forward slash. Another simple test case is:
prompt$ cd a-name-of-director-that-does-exit<TAB>
Execute above command on Windows, the result is
cd a-name-of-director-that-does-exit\
note that a backslash is appended, should use forward slash.