Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lines falsely identified as commands in shell session #3047

Closed
sunknudsen opened this issue Aug 24, 2021 · 2 comments · Fixed by #3048
Closed

Lines falsely identified as commands in shell session #3047

sunknudsen opened this issue Aug 24, 2021 · 2 comments · Fixed by #3048

Comments

@sunknudsen
Copy link

sunknudsen commented Aug 24, 2021

Information

  • Language: Shell session
  • Plugins: none

Description

# lines are falsely identified as commands.

Only lines that start with $ (in following example) should be considered commands.

Here are a few examples in production (each highlighted word is a separate link).

Issue is likely related to #2644.

Thanks for helping out!

Code snippet

Test page

#: lines are falsely identified as commands
$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD - Data     340.9 GB   disk1s1
   2:                APFS Volume Preboot                 85.9 MB    disk1s2
   3:                APFS Volume Recovery                529.0 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4
   5:                APFS Volume Macintosh HD            11.3 GB    disk1s5

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.9 GB    disk2
   1:             Windows_FAT_32 boot                    268.4 MB   disk2s1
   2:                      Linux                         15.7 GB    disk2s2

$ sudo diskutil unmount /dev/diskn
disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead

$ sudo diskutil unmountDisk /dev/diskn (if previous step fails)
Unmount of all volumes on disk2 was successful

$ sudo dd bs=1m if=$HOME/Downloads/tails-amd64-4.18.img of=/dev/rdiskn
1131+0 records in
1131+0 records out
1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)

$ sudo diskutil unmountDisk /dev/diskn
Unmount of all volumes on disk2 was successful
@RunDevelopment
Copy link
Member

Commands starting with # are a feature, not a bug.

The problem is that there is some ambiguity here. I'll make a PR fixing that.

@sunknudsen
Copy link
Author

Commands starting with # are a feature, not a bug.

👍

The problem is that there is some ambiguity here. I'll make a PR fixing that.

Thanks so much for helping out. 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants