The problem was the `[ ! -f "${bin_loc}" ]` check. `command -v` does not
necessarily return an absolute path (it can just return the name of the
command for builtins) and this is what happened for 'printf'. Thus, the
`[ ! -f` check failed.
This check doesn't really make sense. If `command -v $binary` doesn't
fail you're good to go, it doesn't really matter where $binary is
located.
- Fix `find` in bodgecss.sh appending an extra /
- Remove bashism from bodgecss.sh which doesn't work in 3.2 (macos
default)
- Remove `-p .` from mktemp which is unnecessary and doesn't exist on macos.
[[ is a bashism and is not defined in posix sh. Since the shebang is
#!/bin/sh, the build script is executed with posix sh and this caused
error messages to be printed when building.
[[ couldn't just be replaced with [ because [ doesn't allow matching
globs, so a switch/case was used instead.
sed and base64 have different flags on darwin (and possibly other
BSDs). Alternatively we could encourage the user to install coreutils and use
gsed and gbase64.
This commit makes the compiler pass use different classes in order to
represent the metadata. This enables adding per-class toString/convert
functions. This enables easy type checking and conversion in the `:set`
excmd.
This commit adds a .TridactylEditing class to input fields that are
being edited in an external editor. In the default theme, this
corresponds to just adding Tridactyl's logo to the input field.
It looks like it is impossible to reference Tridactyl's logo in CSS and
have it work on non-privileged pages so instead of doing that we add a
step to the build process which turns one of Tridactyl's logo into its
base64 representation and embeds it in the default.css theme file.
3ec27fd broke the commandline by moving config.ts while
metadata-generation/using code relied on its path. This commit updates
the path. A proper fix is to stop using paths and use names instead.
This commit makes sure typescript targets es2016 when compiling
gen_metadata.ts and than when generating metadata, only the necessary
files are parsed (src/excmds.ts and src/config.ts for now). This
slightly improves build time.
This implements excmd completion. We're using the typescript compiler
API in order to get the documentation and the type of every function of
Tridactyl and generate a file named "src/metadata.ts" which contains
this information. Since this file is dependency-less it can be imported
from every source file.
We then write a regular completion source which just uses the data
contained in metadata.ts in order to generate its completions.
When trying to run scripts/pretty with multiple ugly files staged, the
for loop would treat two space-separated file names as a single file
name. This prevented pretty from working on my machine.
I fixed this issue by making cachedJS() (renamed to cachedFiles since it
returns more than js files) return file names as a newline-separated
list and using IFS=$'\n' to split the filenames on this character.