@gkalpak/aliases 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/config/cfgbash.js +10 -1
- package/bin/config/cfgbash.wsl.js +10 -1
- package/bin/config/cfggit.js +1 -1
- package/bin/config/cfggit.win32.js +1 -1
- package/bin/config/cfggit.wsl.js +2 -2
- package/bin/config/cfggpg.js +9 -0
- package/bin/config/cfgssh.js +21 -0
- package/bin/config/cfgvim.js +1 -1
- package/bin/misc/alv.js +1 -1
- package/lib/constants.js +62 -7
- package/package.json +3 -1
package/bin/config/cfgbash.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
|
@@ -14,5 +14,14 @@ console.log(stripIndentation(`
|
|
|
14
14
|
bind "set show-all-if-ambiguous on";
|
|
15
15
|
bind "TAB:menu-complete";
|
|
16
16
|
|
|
17
|
+
# Ensure the SSH agent is running all the time, so that (in combination with \`AddKeysToAgent yes\`
|
|
18
|
+
# in \`~/.ssh/config\`) it is not necessary to enter the SSH key password on every command (which can
|
|
19
|
+
# get really annoying with git).
|
|
20
|
+
eval $(ssh-agent) > /dev/null;
|
|
21
|
+
|
|
22
|
+
# Skip [husky](https://www.npmjs.com/package/husky) hooks.
|
|
23
|
+
# Uncomment the two lines below to skip hooks.
|
|
24
|
+
#export HUSKY_SKIP_HOOKS="1"; # For older versions.
|
|
25
|
+
#export HUSKY="0"; # For newer versions.
|
|
17
26
|
`));
|
|
18
27
|
/* eslint-enable max-len */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
|
@@ -17,5 +17,14 @@ console.log(stripIndentation(`
|
|
|
17
17
|
# Fix required for GPG signing in WSL.
|
|
18
18
|
export GPG_TTY="$(tty)";
|
|
19
19
|
|
|
20
|
+
# Ensure the SSH agent is running all the time, so that (in combination with \`AddKeysToAgent yes\`
|
|
21
|
+
# in \`~/.ssh/config\`) it is not necessary to enter the SSH key password on every command (which can
|
|
22
|
+
# get really annoying with git).
|
|
23
|
+
eval $(ssh-agent) > /dev/null;
|
|
24
|
+
|
|
25
|
+
# Skip [husky](https://www.npmjs.com/package/husky) hooks.
|
|
26
|
+
# Uncomment the two lines below to skip hooks.
|
|
27
|
+
#export HUSKY_SKIP_HOOKS="1"; # For older versions.
|
|
28
|
+
#export HUSKY="0"; # For newer versions.
|
|
20
29
|
`));
|
|
21
30
|
/* eslint-enable max-len */
|
package/bin/config/cfggit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
package/bin/config/cfggit.wsl.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
|
8
8
|
git config --global core.editor "vim"
|
|
9
|
-
git config --global credential.helper "/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe"
|
|
9
|
+
git config --global credential.helper "/mnt/c/Program\\ Files/Git/mingw64/bin/git-credential-manager.exe"
|
|
10
10
|
git config --global merge.tool "kdiff3"
|
|
11
11
|
git config --global mergetool.kdiff3.path "/mnt/c/Program Files/KDiff3/bin/kdiff3.exe"
|
|
12
12
|
git config --global mergetool.kdiff3.trustExitCode "false"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {stripIndentation} from '../../lib/utils.js';
|
|
3
|
+
console.log(stripIndentation(`
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
5
|
+
### Copy the following into '~/.gnupg/gpg-agent.conf':
|
|
6
|
+
|
|
7
|
+
default-cache-ttl 86400
|
|
8
|
+
max-cache-ttl 86400
|
|
9
|
+
`));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {stripIndentation} from '../../lib/utils.js';
|
|
3
|
+
console.log(stripIndentation(`
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.6]
|
|
5
|
+
### Copy the following into '~/.ssh/config':
|
|
6
|
+
|
|
7
|
+
IdentityFile ~/.ssh/id-rsa-gkalpak.ppk
|
|
8
|
+
AddKeysToAgent yes
|
|
9
|
+
|
|
10
|
+
Host nrg-masternode-1
|
|
11
|
+
HostName 173.212.225.90
|
|
12
|
+
Port 2210
|
|
13
|
+
User nrgstaker
|
|
14
|
+
IdentityFile ~/.ssh/id-rsa-gkalpak.ppk
|
|
15
|
+
|
|
16
|
+
Host nrg-masternode-2
|
|
17
|
+
HostName 62.171.165.219
|
|
18
|
+
Port 2210
|
|
19
|
+
User nrgstaker
|
|
20
|
+
IdentityFile ~/.ssh/id-rsa-gkalpak.ppk
|
|
21
|
+
`));
|
package/bin/config/cfgvim.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import {readFileSync} from 'node:fs';
|
|
3
3
|
import {fileURLToPath} from 'node:url';
|
|
4
4
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
-
console.log('""" [Generated by: @gkalpak/aliases v0.10.
|
|
5
|
+
console.log('""" [Generated by: @gkalpak/aliases v0.10.6]');
|
|
6
6
|
console.log('""" Copy the following into \'~/.vimrc\':\n');
|
|
7
7
|
console.log(readFileSync(`${__dirname}/../../lib/assets/vimrc.txt`, 'utf8').trim() + '\n');
|
package/bin/misc/alv.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
console.log('@gkalpak/aliases v0.10.
|
|
2
|
+
console.log('@gkalpak/aliases v0.10.6');
|
package/lib/constants.js
CHANGED
|
@@ -81,13 +81,22 @@ const CFGBASH_SPEC = isWsl => new AliasSpec(
|
|
|
81
81
|
# Fix required for GPG signing in WSL.
|
|
82
82
|
export GPG_TTY="$(tty)";`}
|
|
83
83
|
|
|
84
|
+
# Ensure the SSH agent is running all the time, so that (in combination with \\\`AddKeysToAgent yes\\\`
|
|
85
|
+
# in \\\`~/.ssh/config\\\`) it is not necessary to enter the SSH key password on every command (which can
|
|
86
|
+
# get really annoying with git).
|
|
87
|
+
eval $(ssh-agent) > /dev/null;
|
|
88
|
+
|
|
89
|
+
# Skip [husky](https://www.npmjs.com/package/husky) hooks.
|
|
90
|
+
# Uncomment the two lines below to skip hooks.
|
|
91
|
+
#export HUSKY_SKIP_HOOKS="1"; # For older versions.
|
|
92
|
+
#export HUSKY="0"; # For newer versions.
|
|
84
93
|
\`));
|
|
85
94
|
/* eslint-enable max-len */
|
|
86
95
|
`),
|
|
87
96
|
/* eslint-enable max-len */
|
|
88
97
|
'Show configuration instructions for `bash`.');
|
|
89
98
|
|
|
90
|
-
const
|
|
99
|
+
const CFGGIT_SPEC = (credHelper, kdiff3Path) => new AliasSpec(
|
|
91
100
|
stripIndentation(`
|
|
92
101
|
#!/usr/bin/env node
|
|
93
102
|
import {stripIndentation} from '../../lib/utils.js';
|
|
@@ -112,6 +121,32 @@ const CFGGIT_SPEC_WITH_CRED_HELPER = (credHelper, kdiff3Path) => new AliasSpec(
|
|
|
112
121
|
`),
|
|
113
122
|
'Show configuration instructions for `git`.');
|
|
114
123
|
|
|
124
|
+
const CFGSSH_SPEC = idFilePath => new AliasSpec(
|
|
125
|
+
stripIndentation(`
|
|
126
|
+
#!/usr/bin/env node
|
|
127
|
+
import {stripIndentation} from '../../lib/utils.js';
|
|
128
|
+
console.log(stripIndentation(\`
|
|
129
|
+
### [Generated by: ${VERSION_STAMP}]
|
|
130
|
+
### Copy the following into '~/.ssh/config':
|
|
131
|
+
|
|
132
|
+
IdentityFile ${idFilePath}
|
|
133
|
+
AddKeysToAgent yes
|
|
134
|
+
|
|
135
|
+
Host nrg-masternode-1
|
|
136
|
+
HostName 173.212.225.90
|
|
137
|
+
Port 2210
|
|
138
|
+
User nrgstaker
|
|
139
|
+
IdentityFile ${idFilePath}
|
|
140
|
+
|
|
141
|
+
Host nrg-masternode-2
|
|
142
|
+
HostName 62.171.165.219
|
|
143
|
+
Port 2210
|
|
144
|
+
User nrgstaker
|
|
145
|
+
IdentityFile ${idFilePath}
|
|
146
|
+
\`));
|
|
147
|
+
`),
|
|
148
|
+
'Show configuration instructions for SSH.');
|
|
149
|
+
|
|
115
150
|
const GIT_CREATE_BRANCH_CMD = srcBranchArg =>
|
|
116
151
|
`git checkout ${srcBranchArg} -b $1 && git config branch.$1.remote origin && ` +
|
|
117
152
|
'git config branch.$1.merge refs/heads/$1';
|
|
@@ -469,16 +504,36 @@ const ALIASES = {
|
|
|
469
504
|
|
|
470
505
|
// GIT
|
|
471
506
|
cfggit: new Alias({
|
|
472
|
-
default:
|
|
473
|
-
win32:
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
'/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe',
|
|
507
|
+
default: CFGGIT_SPEC('manager', '/path/to/kdiff3'),
|
|
508
|
+
win32: CFGGIT_SPEC('manager', 'C:/Program Files/KDiff3/bin/kdiff3.exe'),
|
|
509
|
+
wsl: CFGGIT_SPEC(
|
|
510
|
+
// For whatever reason, `git` wants the credential helper path to have spaces escaped, but
|
|
511
|
+
// the merge-tool path to not have them escaped ¯\_(ツ)_/¯
|
|
512
|
+
'/mnt/c/Program\\\\ Files/Git/mingw64/bin/git-credential-manager.exe',
|
|
478
513
|
'/mnt/c/Program Files/KDiff3/bin/kdiff3.exe'),
|
|
479
514
|
}),
|
|
480
515
|
|
|
481
516
|
|
|
517
|
+
// GPG
|
|
518
|
+
cfggpg: new Alias(new AliasSpec(
|
|
519
|
+
stripIndentation(`
|
|
520
|
+
#!/usr/bin/env node
|
|
521
|
+
import {stripIndentation} from '../../lib/utils.js';
|
|
522
|
+
console.log(stripIndentation(\`
|
|
523
|
+
### [Generated by: ${VERSION_STAMP}]
|
|
524
|
+
### Copy the following into '~/.gnupg/gpg-agent.conf':
|
|
525
|
+
|
|
526
|
+
default-cache-ttl 86400
|
|
527
|
+
max-cache-ttl 86400
|
|
528
|
+
\`));
|
|
529
|
+
`),
|
|
530
|
+
'Show configuration instructions for GPG.')),
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
// SSH
|
|
534
|
+
cfgssh: new Alias(CFGSSH_SPEC('~/.ssh/id-rsa-gkalpak.ppk')),
|
|
535
|
+
|
|
536
|
+
|
|
482
537
|
// VIM
|
|
483
538
|
cfgvim: new Alias(new AliasSpec(
|
|
484
539
|
stripIndentation(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkalpak/aliases",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "My global aliases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Utility"
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"alv": "./bin/misc/alv.js",
|
|
43
43
|
"cfgbash": "./bin/config/cfgbash.js",
|
|
44
44
|
"cfggit": "./bin/config/cfggit.js",
|
|
45
|
+
"cfggpg": "./bin/config/cfggpg.js",
|
|
46
|
+
"cfgssh": "./bin/config/cfgssh.js",
|
|
45
47
|
"cfgvim": "./bin/config/cfgvim.js",
|
|
46
48
|
"dkrall": "./bin/docker/dkrall.js",
|
|
47
49
|
"dkratt": "./bin/docker/dkratt.js",
|