Comments (11)
I use bin/domterm all the time. Probably an incompatibility in "which":
$ which --version
GNU which v2.20, Copyright (C) 1999 - 2008 Carlo Wood.
GNU which comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.
The man page says: "For each of its arguments it prints to stdout the full path of the executables that would have been executed when this argument had been entered at the shell prompt."
Seems like the MacOS version (presumably from BSD?) isn't as capable.
We also have the option of using the bash builtin 'type',but that doesn't handle the "bin/domterm" case, it appears.
from domterm.
My which
doesn't even support --version (or even -v) as an option - looks like I'm using the debianutils version.
It's worth noting that you mentioned bash. I'm on zsh, and so are many others. Since any Linux worth its salt has bash installed and so does OS X, would you be willing to put a shebang line in the script to ensure everyone is running it on the same shell?
from domterm.
Yes, I'm fine restricting it to bash. After all, I require Java (for now); maximum portability can wait. (The Windows port may be more interesting ...)
from domterm.
brew install gnu-which
fixed it for me. Thanks for the suggestion about which!
from domterm.
I'm going to close this. Feel free to reopen if you want.
from domterm.
I also ran into this. As it gives a first bad impression ("doesn't run out of the box"), I suggest you re-open this (I can't); I'll submit a patch later.
from domterm.
Would it make sense to use 'type -p'? It seems to Do The Right Thing (based on a few tests). It means we require bash (though ksh also seems to work). As a bonus, it's faster, since it's built-in.
from domterm.
What do you think of the following:
#!/bin/bash
thisfile=`type -p $0`
case "$thisfile" in
"") echo "installation error - can't find path to $0"; exit -1 ;;
/*) ;;
*) thisfile="$PWD/$thisfile" ;;
esac
while test -L "$thisfile"; do thisfile=$(readlink -f "$thisfile"); done
DOMTERM_DIR=`echo $(dirname $thisfile) | sed -e 's|/bin$||'`
etc as before
from domterm.
I can verify that the above works.
from domterm.
I checked this change in. Thanks for testing it.
from domterm.
Yes, type -p
is more portable (and works for me, too) -- but then I wonder why this code needs to be so complicated? See my #22.
from domterm.
Related Issues (20)
- RoadMap HOT 12
- DomTerm freezing - no input or output HOT 43
- DomTerm freezes when using sudo HOT 5
- A new DomTerm/Julia calculator HOT 7
- problems on WebKit/WebKitGtk HOT 5
- Config file example
- Issues with micro and nano HOT 4
- Questions HOT 5
- Sixel glitches HOT 19
- Failure to build wry HOT 6
- Accessibility HOT 1
- issues specific to macOS HOT 1
- QT issues including domterm: unrecognized option '--qtdomterm' HOT 22
- better dark mode styling HOT 22
- easier install on mac? HOT 4
- MacOS build instructions wrong HOT 25
- window list display
- issues with xterm.js support
- Page reload behavior in browser HOT 4
- Feature request: kitty keyboard protocol HOT 15
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 domterm.