mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Fix #117: add :version command
:version currently fills the command line with the version number in order to display it to the user (hacky) and copies it to the clipboard.
This commit is contained in:
parent
9e2c21123f
commit
d65acf9f64
3 changed files with 13 additions and 1 deletions
|
@ -10,6 +10,6 @@ scripts/excmds_macros.py
|
||||||
scripts/newtab.md.sh
|
scripts/newtab.md.sh
|
||||||
scripts/make_docs.sh &
|
scripts/make_docs.sh &
|
||||||
|
|
||||||
webpack --display errors-only &
|
(webpack --display errors-only && scripts/git_version.sh)&
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
5
scripts/git_version.sh
Executable file
5
scripts/git_version.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
version=$(git describe --tags)
|
||||||
|
|
||||||
|
sed -i 's/REPLACE_ME_WITH_THE_VERSION_USING_SED/'$version'/' ./build/background.js
|
|
@ -511,6 +511,13 @@ export function suppress(preventDefault?: boolean, stopPropagation?: boolean) {
|
||||||
mode("ignore")
|
mode("ignore")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#background
|
||||||
|
export function version(){
|
||||||
|
clipboard("yank","REPLACE_ME_WITH_THE_VERSION_USING_SED")
|
||||||
|
fillcmdline_notrail("REPLACE_ME_WITH_THE_VERSION_USING_SED")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/** Example:
|
/** Example:
|
||||||
- `mode ignore` to ignore all keys.
|
- `mode ignore` to ignore all keys.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue