rtfm-filemanager 7.3.1 → 7.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/rtfm +30 -8
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 9ad1d9581fc33576497a4af185ce404251e71e1df5e6f080cf19b3e29fb8eb41
         | 
| 4 | 
            +
              data.tar.gz: 2007300af7b17fdb161c2510f6d8594a169e5f7001f7ff0e17d73524e8bded4b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fb256db6d25e7b19474f425282c5d2d012cd2380bff08bb5e78665aed9c4f2dd5ebdf416c2e13cabe5a78ef446e68b3bbc6d587e5f81a7bffa68d7fcd24a105d
         | 
| 7 | 
            +
              data.tar.gz: b3972f6e8a57d02478384b65b83a5ee3222b633a37cf10381511b0b50dbc838e9dbd6df00d3872c937ad1aa94dbceaee489d944ac1bbf995ad22e4ac39eed69e
         | 
    
        data/bin/rtfm
    CHANGED
    
    | @@ -18,7 +18,7 @@ | |
| 18 18 | 
             
            #             get a great understanding of the code itself by simply sending
         | 
| 19 19 | 
             
            #             or pasting this whole file into you favorite AI for coding with
         | 
| 20 20 | 
             
            #             a prompt like this: "Help me understand every part of this code".
         | 
| 21 | 
            -
            @version    = '7.3. | 
| 21 | 
            +
            @version    = '7.3.2' # Image persistence and C-Y copies images
         | 
| 22 22 |  | 
| 23 23 | 
             
            # SAVE & STORE TERMINAL {{{1
         | 
| 24 24 | 
             
            ORIG_STTY = `stty -g`.chomp
         | 
| @@ -290,7 +290,7 @@ CONFIG_FILE   = File.join(RTFM_HOME, 'conf') | |
| 290 290 | 
             
              CLIPBOARD COPY
         | 
| 291 291 | 
             
                y       = Copy path of selected item to primary selection (for pasting with middle mouse button)
         | 
| 292 292 | 
             
                Y       = Copy path of selected item to clipboard
         | 
| 293 | 
            -
                Ctrl-y  = Copy content of right pane to clipboard
         | 
| 293 | 
            +
                Ctrl-y  = Copy content of right pane to clipboard (images: copies image file, text: copies text)
         | 
| 294 294 | 
             
                          Turn off batcat syntax highlighting with 'b' for a clean copy of content
         | 
| 295 295 |  | 
| 296 296 | 
             
              SYSTEM SHORTCUTS
         | 
| @@ -1049,8 +1049,8 @@ def getkey # {{{3 | |
| 1049 1049 |  | 
| 1050 1050 | 
             
              return unless chr
         | 
| 1051 1051 |  | 
| 1052 | 
            -
               | 
| 1053 | 
            -
               | 
| 1052 | 
            +
              # Don't clear image here - let render system handle it when @pR.update is true
         | 
| 1053 | 
            +
              # This preserves images during operations that don't change the selected item
         | 
| 1054 1054 | 
             
              if handler = KEYMAP[chr]  # rubocop:disable Lint/AssignmentInCondition
         | 
| 1055 1055 | 
             
                m = method(handler)
         | 
| 1056 1056 | 
             
                m.arity == 1 ? m.call(chr) : m.call
         | 
| @@ -3945,10 +3945,32 @@ def get_selected_full_path # {{{3 | |
| 3945 3945 | 
             
            end
         | 
| 3946 3946 |  | 
| 3947 3947 | 
             
            def copy_right # {{{3
         | 
| 3948 | 
            -
               | 
| 3949 | 
            -
             | 
| 3950 | 
            -
             | 
| 3951 | 
            -
             | 
| 3948 | 
            +
              if @image && @selected && @selected.match(@imagefile)
         | 
| 3949 | 
            +
                # Copy the image file to clipboard
         | 
| 3950 | 
            +
                escaped_path = Shellwords.escape(@selected)
         | 
| 3951 | 
            +
                # Detect image type from extension
         | 
| 3952 | 
            +
                ext = File.extname(@selected).downcase
         | 
| 3953 | 
            +
                mime_type = case ext
         | 
| 3954 | 
            +
                            when '.png' then 'image/png'
         | 
| 3955 | 
            +
                            when '.jpg', '.jpeg' then 'image/jpeg'
         | 
| 3956 | 
            +
                            when '.gif' then 'image/gif'
         | 
| 3957 | 
            +
                            when '.bmp' then 'image/bmp'
         | 
| 3958 | 
            +
                            when '.webp' then 'image/webp'
         | 
| 3959 | 
            +
                            else 'image/png'
         | 
| 3960 | 
            +
                            end
         | 
| 3961 | 
            +
             | 
| 3962 | 
            +
                # Use cat to pipe file contents to xclip
         | 
| 3963 | 
            +
                if system("cat #{escaped_path} | xclip -selection clipboard -target #{mime_type} 2>/dev/null")
         | 
| 3964 | 
            +
                  @pB.say(' Image copied to clipboard')
         | 
| 3965 | 
            +
                else
         | 
| 3966 | 
            +
                  @pB.say(' Failed to copy image - xclip may not be installed')
         | 
| 3967 | 
            +
                end
         | 
| 3968 | 
            +
              else
         | 
| 3969 | 
            +
                # Copy right pane text content
         | 
| 3970 | 
            +
                clip = 'xclip -selection clipboard'
         | 
| 3971 | 
            +
                @pB.say(' Right pane text copied to clipboard')
         | 
| 3972 | 
            +
                shell("echo -n #{Shellwords.escape(@pR.text.pure)} | #{clip} > /dev/null 2>&1", background: true)
         | 
| 3973 | 
            +
              end
         | 
| 3952 3974 | 
             
            end
         | 
| 3953 3975 |  | 
| 3954 3976 | 
             
            # SYSTEM SHORTCUTS {{{2
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rtfm-filemanager
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 7.3. | 
| 4 | 
            +
              version: 7.3.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Geir Isene
         | 
| @@ -67,7 +67,7 @@ dependencies: | |
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 68 | 
             
                    version: '7.4'
         | 
| 69 69 | 
             
            description: |-
         | 
| 70 | 
            -
              RTFM v7.3. | 
| 70 | 
            +
              RTFM v7.3.2: Image persistence during operations and C-Y copies images to clipboard.
         | 
| 71 71 | 
             
               A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. Features include remote SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks, and much more. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers.
         | 
| 72 72 | 
             
            email: g@isene.com
         | 
| 73 73 | 
             
            executables:
         |