Comments (27)
Same issue here. If I type "lor" and accept the first option "paragraphs" a google search will be started.
Expected behaviour:
Copy a lorem text into clipboard. ;-)
from alfred-lorem-ipsum.
Just to confirm @ruudvanham - you are saying your issue was fixed by using the latest version (v0.2.1) of the workflow?
Also, @wirtzdan : Is your issue resolved with the update to v0.2.1?
from alfred-lorem-ipsum.
I had this exact issue a few days ago and Till released a new version to fix it.
Which version are you running?
from alfred-lorem-ipsum.
Same issue here, just updated alfred and imported the latest workflow. v0.2.1
from alfred-lorem-ipsum.
I'm confused too.
from alfred-lorem-ipsum.
No sorry, i'm still having the issue, even after updating alfred and the workflow to the latest versions
from alfred-lorem-ipsum.
What's your Alfred and macOS version?
from alfred-lorem-ipsum.
Alfred: v4.6.1 [1274]
Lorem Ipsum: v0.2.1
MacOs: Monterey 12.0.1
from alfred-lorem-ipsum.
@ruudvanham @cgpro Are you two on Intel or M1 chips?
Do you have have PHP installed via Homebrew?
from alfred-lorem-ipsum.
Nope:
macOS MOnterey (12.0.1)
iMac (Retina 5K i7 end 2015 > Intel)
$ php -v PHP 7.4.12 (cli) (built: Nov 30 2020 13:28:43) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
Don't know how I installed this PHP-Version anymore.
from alfred-lorem-ipsum.
Could you run which php
for me to reveal the path?
from alfred-lorem-ipsum.
It's the version from MAMP
$ which php php: aliased to /Applications/MAMP/bin/php/php7.4.12/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php7.4.12.ini"
from alfred-lorem-ipsum.
Can you go into your workflow and try this script instead?
if [ -f "/opt/homebrew/bin/php" ]; then
/opt/homebrew/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/local/bin/php" ]; then
/usr/local/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/bin/php" ]; then
/usr/bin/php loremipsum.php "words" "{query}"
else
php loremipsum.php "words" "{query}"
fi
from alfred-lorem-ipsum.
Nope, after typing 'lorem words' alfred want to perform a google search.
If I type 'lorem wor':
If you want, we can do a call with screen sharing, if you can't reproduce it. Maybe its a setting? (not changed/updated after an update maybe)
from alfred-lorem-ipsum.
When you debug the workflow in Alfred, are you seeing any errors?
from alfred-lorem-ipsum.
This works in combination Language /bin/zsh (and not bin/bash)
if [ -f "/opt/homebrew/bin/php" ]; then /opt/homebrew/bin/php loremipsum.php "words" "{query}" elif [ -f "/usr/local/bin/php" ]; then /usr/local/bin/php loremipsum.php "words" "{query}" elif [ -f "/usr/bin/php" ]; then /usr/bin/php loremipsum.php "words" "{query}" else /Applications/MAMP/bin/php/php7.4.12/bin/php loremipsum.php "words" "{query}" fi
from alfred-lorem-ipsum.
@cgpro: Can you post the raw output of which php
? Ideally a screenshot of your terminal?
from alfred-lorem-ipsum.
from alfred-lorem-ipsum.
I had to manually replace the script PHP location:
% which php
/opt/homebrew/opt/[email protected]/bin/php
I'm not familiar with bash scripts, but it would be better to avoid hardcoding every possible PHP location in the script itself... Can't we use the output of which php
to use it right away?
Anyway for now it works again, hope it helps.
from alfred-lorem-ipsum.
@nicooprat: I don't think we can, but we can use it as the fallback.
if [ -f "/opt/homebrew/bin/php" ]; then
/opt/homebrew/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/local/bin/php" ]; then
/usr/local/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/bin/php" ]; then
/usr/bin/php loremipsum.php "words" "{query}"
else
php loremipsum.php "words" "{query}"
fi
Can you give this one a try if it works?
from alfred-lorem-ipsum.
This might be an option - I tested with this on my Mac and it worked ok.
Should however add an else for error catching.
if [ -f "$(which php)" ]; then
$(which php) loremipsum.php "words" "{query}"
fi
from alfred-lorem-ipsum.
@rverrips Could you explain what you did exactly? I just tried it (with bash & zsh), but with no luck:
$(which php) loremipsum.php "words" "{query}"
from alfred-lorem-ipsum.
@rverrips /bin/bash
may not have php
in its PATH
.
from alfred-lorem-ipsum.
I wonder if this would cover enough cases:
if [ -f "/opt/homebrew/bin/php" ]; then
/opt/homebrew/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/local/bin/php" ]; then
/usr/local/bin/php loremipsum.php "words" "{query}"
elif [ -f "/usr/bin/php" ]; then
/usr/bin/php loremipsum.php "words" "{query}"
elif [ -f "$(which php)" ]; then
$(which php) loremipsum.php "words" "{query}"
else
php loremipsum.php "words" "{query}"
fi
That would allow people to link php
as an alias even.
from alfred-lorem-ipsum.
@rverrips Could you explain what you did exactly? I just tried it (with bash & zsh), but with no luck:
$(which php) loremipsum.php "words" "{query}"
Apologies @nicooprat and @tillkruss ... My hope was that $(which php)
would execute the string returned from (which php), i.e. current php binary.
This works in "regular" bash, sh and zsh, but seems this does not work within the Alfred script execution - Apologies for the wild goose chase
Like the issues we have with various paths to php, it seems Alfred can't find which
either ... sigh
(Please disregard my suggestion to use $(which php)
)
from alfred-lorem-ipsum.
The /bin/bash
used by Alfred seems capable of which php
and command -v php
, but php
may not be in the bash path.
from alfred-lorem-ipsum.
I've tweaked this in v0.2.2. Please re-open if the issue persists.
from alfred-lorem-ipsum.
Related Issues (13)
- Randomize generated text HOT 7
- Feature: Generate lists and characters HOT 3
- Readme update HOT 1
- Changes my keyboard layout HOT 1
- Alfred 4 MacOS 12 support? HOT 2
- Name PHP as a requirement HOT 4
- Fatal error for lorem sentences and paragraphs HOT 5
- json error for sentences & paragraphs HOT 2
- Search Google instead of execute command HOT 3
- Does this no longer work? HOT 2
- Google search overrides text output HOT 14
- Library not loaded: @@HOMEBREW_PREFIX@@/opt/[email protected]/lib/libssl.1.1.dylib HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-lorem-ipsum.