-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathxdg.mjs
More file actions
executable file
·34 lines (31 loc) · 859 Bytes
/
xdg.mjs
File metadata and controls
executable file
·34 lines (31 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env nodejsscript
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $ */
const css= echo.css("h1 { color: lightblue; }");
echo.use("-P", "%cXDG dirs:", css.h1, [
$.xdg.home(),
$.xdg.config(),
$.xdg.cache(),
$.xdg.data(),
$.xdg.root(),
$.xdg.cwd(),
$.xdg.main(),
]);
echo.use("-P", "%cXDG dirs & subdir `test_dir` (using function``):", css.h1, [
$.xdg.home`test_dir`,
$.xdg.config`test_dir`,
$.xdg.cache`test_dir`,
$.xdg.data`test_dir`,
$.xdg.root`test_dir`,
$.xdg.cwd`test_dir`,
$.xdg.main`test_dir`,
]);
echo.use("-P", "%cXDG dirs & subdir `test_dir` (using function()):", css.h1, [
$.xdg.home("test_dir"),
$.xdg.config("test_dir"),
$.xdg.cache("test_dir"),
$.xdg.data("test_dir"),
$.xdg.root("test_dir"),
$.xdg.cwd("test_dir"),
$.xdg.main("test_dir"),
]);
$.exit(0);