Jump to content

Archetyped

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Archetyped

  1. 56 minutes ago, vitor said:

    Run Script sends the script’s output without modifying it. echo does indeed send a newline without -n; printf sends without a newline unless you add one (\n) AppleScript and JXA always send a newline, except if you bend over backwards to avoid it. There’s a Transform Utility which can trim surrounding whitespace that will guarantee the newline isn’t passed to the next action.

     

    Thanks for the tips 👍

  2. Thanks.  There was no explicit newline in the Terminal Command itself, but thanks to your comment, I started looking at the other actions that process the values sent to the Terminal Command action.

     

    I learned that output from the Run Script action can add a newline unless it is explicitly suppressed.  Changing the final echo statement in that action to do just that resolved the issue:

     

    echo -n "${output[@]}"

     

    Thanks!

  3. I would like to open a new terminal window with Alfred to run a preset bash script (e.g. `my_script`).

     

    The script has a confirmation prompt that affects the behavior depending on the value provided.

     

    read -p "Start processing? (y/n): " conf_process

     

    The script stops at this prompt when run directly from a terminal window.

    However, when a script is run Alfred's Terminal Command action, it appears that the first `read` statement in the script is automatically executed without any input.

     

    How can I run scripts via Alfred's Terminal Command without the first `read` statement being bypassed?

  4. Experiencing the same issue since updating to the Dropbox beta.  Dropbox files are displayed in Spotlight's search results, but not in Alfred's file search results.

     

    Details:

    • Alfred version: 4.6.3 [1285]
    • macOS version: 12.1
    • Dropbox app version: 142.3.4187
    • Dropbox settings; Do you have it set to store files locally or cloud-only?: No such setting in Dropbox preferences, however all files are accessible locally without a network connection.
    • Dropbox folder path: ~/Library/CloudStorage/Dropbox (not a symlink)
    • ~/Library/CloudStorage in Alfred Search Scope: Yes
    • Dropbox files listed in Spotlight search results: Yes
    • Dropbox files listed in Alfred file search results: No
    • Dropbox files listed in Alfred default results (with "Search all file types" enabled): No

    File search troubleshooting output:

     

    Starting Diagnostics...
    
    File: 'test_dropbox.txt'
    Path: '/Users/username/Library/CloudStorage/Dropbox'
    
    -----------------------------------------------------------
    
    Check file cache database...
    
     File cache integrity is ok
    
    -----------------------------------------------------------
    
    Check if file is readable...
    
     Alfred has permissions to read this file.
    
    -----------------------------------------------------------
    
    Check if volume '/' is indexed by macOS...
    
     Indexing is enabled on this drive
    
    -----------------------------------------------------------
    
    Check direct file metadata...
    
     Direct metadata available
    
    Display Name: test_dropbox.txt
     Other Names: 
    Content Type: public.plain-text
       Last Used: 
    
    -----------------------------------------------------------
    
    Check mdls file metadata...
    
     Metadata contains required items
    
    _kMDItemDisplayNameWithExtensions      = "test_dropbox.txt"
    kMDItemContentCreationDate             = 2022-02-16 18:37:28 +0000
    kMDItemContentCreationDate_Ranking     = 2022-02-16 00:00:00 +0000
    kMDItemContentModificationDate         = 2022-02-16 18:37:28 +0000
    kMDItemContentModificationDate_Ranking = 2022-02-16 00:00:00 +0000
    kMDItemContentType                     = "public.plain-text"
    kMDItemContentTypeTree                 = (
        "public.plain-text",
        "public.text",
        "public.data",
        "public.item",
        "public.content"
    )
    kMDItemDateAdded                       = 2022-02-16 18:37:28 +0000
    kMDItemDateAdded_Ranking               = 2022-02-16 00:00:00 +0000
    kMDItemDisplayName                     = "test_dropbox.txt"
    kMDItemDocumentIdentifier              = 14297
    kMDItemFileItemID                      = "__fp/NzdjNGNkZTEtZDQwZC00NjBmLWI3NWQtMmZhYTgxNTY0ZDEx/__fp/fs/docID(14297)"
    kMDItemFilename                        = "test_dropbox.txt"
    kMDItemFileProviderID                  = "com.getdropbox.dropbox.fileprovider"
    kMDItemFSContentChangeDate             = 2022-02-16 18:37:28 +0000
    kMDItemFSCreationDate                  = 2022-02-16 18:37:28 +0000
    kMDItemFSCreatorCode                   = ""
    kMDItemFSFinderFlags                   = 0
    kMDItemFSHasCustomIcon                 = (null)
    kMDItemFSInvisible                     = 0
    kMDItemFSIsExtensionHidden             = 0
    kMDItemFSIsStationery                  = (null)
    kMDItemFSLabel                         = 0
    kMDItemFSName                          = "test_dropbox.txt"
    kMDItemFSNodeCount                     = (null)
    kMDItemFSOwnerGroupID                  = 20
    kMDItemFSOwnerUserID                   = 501
    kMDItemFSSize                          = 7
    kMDItemFSTypeCode                      = ""
    kMDItemInterestingDate_Ranking         = 2022-02-16 00:00:00 +0000
    kMDItemIsDownloading                   = 0
    kMDItemIsShared                        = 0
    kMDItemIsUploaded                      = 1
    kMDItemIsUploading                     = 0
    kMDItemKind                            = "Plain Text Document"
    kMDItemLogicalSize                     = 7
    kMDItemPhysicalSize                    = 4096
    kMDItemUserOwned                       = 0
    
    -----------------------------------------------------------
    
    Check file is in search scope...
    
     File exists within Alfred's default search scope
    
    -----------------------------------------------------------
    
     Troubleshooting passed

     

    Please let me know if there's any other information you need.

×
×
  • Create New...