hiiro 0.1.320 → 0.1.321
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/bin/h-config +9 -9
- data/lib/hiiro/config.rb +7 -0
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 155f21221068bb182837aa80c7b920edfb592d46003cc697761441fca7e104d4
|
|
4
|
+
data.tar.gz: c911e69d3f63924790edd1103f299450ee19bbf70587f54ab205817a0ed9956b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7f3f13b81a41a625160d27c7e90a093f20678cd835f5ef1eadc95999fa00c17b41eaac793135389573746e233120b41f94363f87e59bbffac1357c9a573db47
|
|
7
|
+
data.tar.gz: 195f053e63a71b2975b4fb29addb85893e91012b1482e08547169e762d4651d9397c0a228b9e29735b3e16928d37f2cee906281ed0e674155366806590e7bdaa
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.321] - 2026-04-01
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Extract `open_config` to `Hiiro::Config.open` singleton method; simplify parameter order from `dir:, file:` to positional `file, dir: nil`
|
|
7
|
+
- Update all config subcommands to use new `Hiiro::Config.open` interface
|
|
8
|
+
|
|
3
9
|
## [0.1.320] - 2026-04-01
|
|
4
10
|
|
|
5
11
|
### Changed
|
|
@@ -265,4 +271,4 @@
|
|
|
265
271
|
## [0.1.295]
|
|
266
272
|
|
|
267
273
|
### Changed
|
|
268
|
-
- Filter logic changes for PR management
|
|
274
|
+
- Filter logic changes for PR management
|
data/bin/h-config
CHANGED
|
@@ -6,43 +6,43 @@ Hiiro.run(*ARGV) {
|
|
|
6
6
|
add_subcmd(:vim) {
|
|
7
7
|
dir = '~/.config/nvim'
|
|
8
8
|
file = File.exist?(File.expand_path('~/.config/nvim/init.lua')) ? 'init.lua' : 'init.vim'
|
|
9
|
-
open_config(dir: dir
|
|
9
|
+
open_config(file, dir: dir)
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
add_subcmd(:git) {
|
|
13
13
|
make_child(subcmd, *args) {
|
|
14
14
|
add_subcmd(:global) {
|
|
15
|
-
open_config(
|
|
15
|
+
open_config('.gitconfig', dir: '~')
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
add_subcmd(:ignore) {
|
|
19
|
-
open_config(dir: '~/.config/git'
|
|
19
|
+
open_config('ignore', dir: '~/.config/git')
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
add_subcmd(:local) {
|
|
23
23
|
root = `git rev-parse --show-toplevel`.chomp
|
|
24
|
-
open_config(
|
|
24
|
+
open_config('.git/config', dir: root)
|
|
25
25
|
}
|
|
26
26
|
}.run
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
add_subcmd(:tmux) {
|
|
30
|
-
open_config(
|
|
30
|
+
open_config('.tmux.conf', dir: '~')
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
add_subcmd(:zsh) {
|
|
34
|
-
open_config(
|
|
34
|
+
open_config('.zshrc', dir: '~')
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
add_subcmd(:profile) {
|
|
38
|
-
open_config(
|
|
38
|
+
open_config('.zprofile', dir: '~')
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
add_subcmd(:starship) {
|
|
42
|
-
open_config(
|
|
42
|
+
open_config('starship.toml', dir: '~/.config/starship')
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
add_subcmd(:claude) {
|
|
46
|
-
open_config(
|
|
46
|
+
open_config('settings.json', dir: '~/.claude')
|
|
47
47
|
}
|
|
48
48
|
}
|
data/lib/hiiro/config.rb
CHANGED
|
@@ -4,6 +4,13 @@ class Hiiro
|
|
|
4
4
|
DATA_DIR = File.join(Dir.home, '.local/share/hiiro')
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
|
+
def open(file, dir: nil)
|
|
8
|
+
dir_path = File.expand_path(dir || '~')
|
|
9
|
+
full_path = File.expand_path(file, dir_path)
|
|
10
|
+
Dir.chdir(dir_path)
|
|
11
|
+
system(ENV['EDITOR'] || 'vim', full_path)
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def path(relpath='')
|
|
8
15
|
File.join(BASE_DIR, relpath)
|
|
9
16
|
end
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
|
@@ -221,10 +221,8 @@ class Hiiro
|
|
|
221
221
|
end
|
|
222
222
|
end
|
|
223
223
|
|
|
224
|
-
def open_config(dir
|
|
225
|
-
|
|
226
|
-
Dir.chdir(File.expand_path(dir))
|
|
227
|
-
edit_files(full_path)
|
|
224
|
+
def open_config(file, dir: nil)
|
|
225
|
+
Hiiro::Config.open(file, dir: dir)
|
|
228
226
|
end
|
|
229
227
|
|
|
230
228
|
def tmux_client
|