Using `-w newtab` wouldn't allow us to use selectors with `-c`, and
using composite would always open a new empty tab on cancel (esc).
Other changes:
- Better flag handling in hint().
- `-c` is now a flag (can be combined with others like `-t`), and is
handled in the `default` case
- support flags `-c`, `-J` and `-t` in any position
https://github.com/tridactyl/tridactyl/pull/1355 introduced a bug on
systems where profile names do not match profile paths. Fixing it
required implementing proper profiles.ini parsing, which should help
making profile discovery work on windows.
The new getProfileDir() function breaks compatibility with previous
versions. The previous version turned backslashes into slashes on
windows. I believe doing this is wrong since paths such as
`C:/Users/Bob` do not make any sense on windows. They might work in
mingw and wsl but I believe we should aim to have everything work on
'normal' windows.
- 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.
Having `:editor` in the background script and constantly messaging the
content one to update the page doesn't really make sense. This commit
moves `:editor` to the content script and thus simplifies the code a
little bit.
All functions in native_background.ts use browserBg in order to interact
with the native messenger. This means that these functions can also be
used in the content script. This means that there's no point in keeping
these functions in the background/ folder and that there's no point in
having a native_background message type.
leavegthubalone is used in content.ts but wasn't defined in config.ts.
This didn't cause any bugs but prevented leavegithubalone from being
shown in command line completions. This commit fixes that.
profilecmd.code is not necessarily different from 0 if `find` doesn't
return any results. This commit makes sure getProfileDir() checks for
such situations.
This commit does two things:
- If the user didn't specify any arguments, try to detect what profile
is currently being used and specify it in the command passed to
firefox. This makes sure tabs opened with `:nativeopen` are opened
with the right profile if multiple firefox profiles are running.
- Quote url argument to enable adding spaces and quotes to the URL
(closes#555)