sesh 0.3.6 → 0.3.7
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/Gemfile.lock +1 -1
- data/Session.vim +89 -36
- data/exe/return_to_sesh +1 -1
- data/lib/sesh/cli.rb +6 -0
- data/lib/sesh/inferences.rb +1 -1
- data/lib/sesh/tmux_control.rb +2 -1
- data/lib/sesh/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a59e65539d5d56ba17b8bb8c3995e7b43335e98b
|
4
|
+
data.tar.gz: 23d9f49e10e80f6b4755eb937cda23fc4b2c051b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d13306e36fe937e8983ee312c3132f5396bba504a3dbd167fab7b886b685a683563739aab5169ffb3492aceae03ccab8a807a37c4ec9670d497e792801e355b8
|
7
|
+
data.tar.gz: 36b5b9502a2ed282c3f5fb8a644a7d400c9750f81752d465acfef94fe4f8213b048575a20f886c28999cb8854f61249d804a4073df287c3c4086fca92b82843f
|
data/Gemfile.lock
CHANGED
data/Session.vim
CHANGED
@@ -325,6 +325,7 @@ badd +18 exe/return_to_sesh.applescript
|
|
325
325
|
badd +1 \'/Users/smit1625/Sites/sesh/exe/return_to_sesh.applescript\'
|
326
326
|
badd +2 exe/return_to_sesh
|
327
327
|
badd +3 exe/sesh
|
328
|
+
badd +4 Gemfile
|
328
329
|
argglobal
|
329
330
|
silent! argdel *
|
330
331
|
edit lib/sesh/version.rb
|
@@ -341,6 +342,10 @@ wincmd _ | wincmd |
|
|
341
342
|
split
|
342
343
|
2wincmd k
|
343
344
|
wincmd w
|
345
|
+
wincmd _ | wincmd |
|
346
|
+
vsplit
|
347
|
+
1wincmd h
|
348
|
+
wincmd w
|
344
349
|
wincmd w
|
345
350
|
wincmd w
|
346
351
|
wincmd _ | wincmd |
|
@@ -350,26 +355,33 @@ wincmd w
|
|
350
355
|
wincmd w
|
351
356
|
wincmd _ | wincmd |
|
352
357
|
vsplit
|
353
|
-
|
358
|
+
wincmd _ | wincmd |
|
359
|
+
vsplit
|
360
|
+
2wincmd h
|
361
|
+
wincmd w
|
354
362
|
wincmd w
|
355
363
|
set nosplitbelow
|
356
364
|
set nosplitright
|
357
365
|
wincmd t
|
358
366
|
set winheight=1 winwidth=1
|
359
367
|
exe '1resize ' . ((&lines * 15 + 31) / 62)
|
360
|
-
exe 'vert 1resize ' . ((&columns *
|
368
|
+
exe 'vert 1resize ' . ((&columns * 181 + 136) / 272)
|
361
369
|
exe '2resize ' . ((&lines * 14 + 31) / 62)
|
362
|
-
exe 'vert 2resize ' . ((&columns *
|
370
|
+
exe 'vert 2resize ' . ((&columns * 90 + 136) / 272)
|
363
371
|
exe '3resize ' . ((&lines * 14 + 31) / 62)
|
364
|
-
exe 'vert 3resize ' . ((&columns *
|
365
|
-
exe '4resize ' . ((&lines *
|
366
|
-
exe 'vert 4resize ' . ((&columns *
|
372
|
+
exe 'vert 3resize ' . ((&columns * 90 + 136) / 272)
|
373
|
+
exe '4resize ' . ((&lines * 14 + 31) / 62)
|
374
|
+
exe 'vert 4resize ' . ((&columns * 181 + 136) / 272)
|
367
375
|
exe '5resize ' . ((&lines * 22 + 31) / 62)
|
368
|
-
exe 'vert 5resize ' . ((&columns *
|
369
|
-
exe '6resize ' . ((&lines *
|
370
|
-
exe 'vert 6resize ' . ((&columns *
|
376
|
+
exe 'vert 5resize ' . ((&columns * 90 + 136) / 272)
|
377
|
+
exe '6resize ' . ((&lines * 22 + 31) / 62)
|
378
|
+
exe 'vert 6resize ' . ((&columns * 90 + 136) / 272)
|
371
379
|
exe '7resize ' . ((&lines * 14 + 31) / 62)
|
372
|
-
exe 'vert 7resize ' . ((&columns *
|
380
|
+
exe 'vert 7resize ' . ((&columns * 90 + 136) / 272)
|
381
|
+
exe '8resize ' . ((&lines * 14 + 31) / 62)
|
382
|
+
exe 'vert 8resize ' . ((&columns * 90 + 136) / 272)
|
383
|
+
exe '9resize ' . ((&lines * 14 + 31) / 62)
|
384
|
+
exe 'vert 9resize ' . ((&columns * 90 + 136) / 272)
|
373
385
|
argglobal
|
374
386
|
setlocal fdm=manual
|
375
387
|
setlocal fde=0
|
@@ -380,12 +392,30 @@ setlocal fml=1
|
|
380
392
|
setlocal fdn=20
|
381
393
|
setlocal fen
|
382
394
|
silent! normal! zE
|
383
|
-
let s:l =
|
395
|
+
let s:l = 2 - ((1 * winheight(0) + 7) / 15)
|
384
396
|
if s:l < 1 | let s:l = 1 | endif
|
385
397
|
exe s:l
|
386
398
|
normal! zt
|
387
|
-
|
388
|
-
normal!
|
399
|
+
2
|
400
|
+
normal! 018|
|
401
|
+
wincmd w
|
402
|
+
argglobal
|
403
|
+
edit exe/return_to_sesh
|
404
|
+
setlocal fdm=manual
|
405
|
+
setlocal fde=0
|
406
|
+
setlocal fmr={{{,}}}
|
407
|
+
setlocal fdi=#
|
408
|
+
setlocal fdl=0
|
409
|
+
setlocal fml=1
|
410
|
+
setlocal fdn=20
|
411
|
+
setlocal fen
|
412
|
+
silent! normal! zE
|
413
|
+
let s:l = 2 - ((1 * winheight(0) + 7) / 14)
|
414
|
+
if s:l < 1 | let s:l = 1 | endif
|
415
|
+
exe s:l
|
416
|
+
normal! zt
|
417
|
+
2
|
418
|
+
normal! 080|
|
389
419
|
wincmd w
|
390
420
|
argglobal
|
391
421
|
edit exe/sesh
|
@@ -398,12 +428,12 @@ setlocal fml=1
|
|
398
428
|
setlocal fdn=20
|
399
429
|
setlocal fen
|
400
430
|
silent! normal! zE
|
401
|
-
let s:l = 3 - ((
|
431
|
+
let s:l = 3 - ((2 * winheight(0) + 7) / 14)
|
402
432
|
if s:l < 1 | let s:l = 1 | endif
|
403
433
|
exe s:l
|
404
434
|
normal! zt
|
405
435
|
3
|
406
|
-
normal!
|
436
|
+
normal! 05|
|
407
437
|
wincmd w
|
408
438
|
argglobal
|
409
439
|
edit lib/sesh/tmux_control.rb
|
@@ -416,12 +446,12 @@ setlocal fml=1
|
|
416
446
|
setlocal fdn=20
|
417
447
|
setlocal fen
|
418
448
|
silent! normal! zE
|
419
|
-
let s:l =
|
449
|
+
let s:l = 186 - ((0 * winheight(0) + 7) / 14)
|
420
450
|
if s:l < 1 | let s:l = 1 | endif
|
421
451
|
exe s:l
|
422
452
|
normal! zt
|
423
|
-
|
424
|
-
normal!
|
453
|
+
186
|
454
|
+
normal! 056|
|
425
455
|
wincmd w
|
426
456
|
argglobal
|
427
457
|
edit lib/sesh/ssh_control.rb
|
@@ -452,12 +482,12 @@ setlocal fml=1
|
|
452
482
|
setlocal fdn=20
|
453
483
|
setlocal fen
|
454
484
|
silent! normal! zE
|
455
|
-
let s:l =
|
485
|
+
let s:l = 40 - ((17 * winheight(0) + 11) / 22)
|
456
486
|
if s:l < 1 | let s:l = 1 | endif
|
457
487
|
exe s:l
|
458
488
|
normal! zt
|
459
|
-
|
460
|
-
normal!
|
489
|
+
40
|
490
|
+
normal! 035|
|
461
491
|
wincmd w
|
462
492
|
argglobal
|
463
493
|
edit lib/sesh.rb
|
@@ -470,12 +500,30 @@ setlocal fml=1
|
|
470
500
|
setlocal fdn=20
|
471
501
|
setlocal fen
|
472
502
|
silent! normal! zE
|
473
|
-
let s:l =
|
503
|
+
let s:l = 43 - ((11 * winheight(0) + 7) / 14)
|
474
504
|
if s:l < 1 | let s:l = 1 | endif
|
475
505
|
exe s:l
|
476
506
|
normal! zt
|
477
|
-
|
478
|
-
normal!
|
507
|
+
43
|
508
|
+
normal! 023|
|
509
|
+
wincmd w
|
510
|
+
argglobal
|
511
|
+
edit sesh.gemspec
|
512
|
+
setlocal fdm=manual
|
513
|
+
setlocal fde=0
|
514
|
+
setlocal fmr={{{,}}}
|
515
|
+
setlocal fdi=#
|
516
|
+
setlocal fdl=0
|
517
|
+
setlocal fml=1
|
518
|
+
setlocal fdn=20
|
519
|
+
setlocal fen
|
520
|
+
silent! normal! zE
|
521
|
+
let s:l = 23 - ((3 * winheight(0) + 7) / 14)
|
522
|
+
if s:l < 1 | let s:l = 1 | endif
|
523
|
+
exe s:l
|
524
|
+
normal! zt
|
525
|
+
23
|
526
|
+
normal! 0
|
479
527
|
wincmd w
|
480
528
|
argglobal
|
481
529
|
edit lib/sesh/cli.rb
|
@@ -488,27 +536,32 @@ setlocal fml=1
|
|
488
536
|
setlocal fdn=20
|
489
537
|
setlocal fen
|
490
538
|
silent! normal! zE
|
491
|
-
let s:l =
|
539
|
+
let s:l = 246 - ((6 * winheight(0) + 7) / 14)
|
492
540
|
if s:l < 1 | let s:l = 1 | endif
|
493
541
|
exe s:l
|
494
542
|
normal! zt
|
495
|
-
|
496
|
-
normal!
|
543
|
+
246
|
544
|
+
normal! 019|
|
497
545
|
wincmd w
|
546
|
+
4wincmd w
|
498
547
|
exe '1resize ' . ((&lines * 15 + 31) / 62)
|
499
|
-
exe 'vert 1resize ' . ((&columns *
|
548
|
+
exe 'vert 1resize ' . ((&columns * 181 + 136) / 272)
|
500
549
|
exe '2resize ' . ((&lines * 14 + 31) / 62)
|
501
|
-
exe 'vert 2resize ' . ((&columns *
|
550
|
+
exe 'vert 2resize ' . ((&columns * 90 + 136) / 272)
|
502
551
|
exe '3resize ' . ((&lines * 14 + 31) / 62)
|
503
|
-
exe 'vert 3resize ' . ((&columns *
|
504
|
-
exe '4resize ' . ((&lines *
|
505
|
-
exe 'vert 4resize ' . ((&columns *
|
552
|
+
exe 'vert 3resize ' . ((&columns * 90 + 136) / 272)
|
553
|
+
exe '4resize ' . ((&lines * 14 + 31) / 62)
|
554
|
+
exe 'vert 4resize ' . ((&columns * 181 + 136) / 272)
|
506
555
|
exe '5resize ' . ((&lines * 22 + 31) / 62)
|
507
|
-
exe 'vert 5resize ' . ((&columns *
|
508
|
-
exe '6resize ' . ((&lines *
|
509
|
-
exe 'vert 6resize ' . ((&columns *
|
556
|
+
exe 'vert 5resize ' . ((&columns * 90 + 136) / 272)
|
557
|
+
exe '6resize ' . ((&lines * 22 + 31) / 62)
|
558
|
+
exe 'vert 6resize ' . ((&columns * 90 + 136) / 272)
|
510
559
|
exe '7resize ' . ((&lines * 14 + 31) / 62)
|
511
|
-
exe 'vert 7resize ' . ((&columns *
|
560
|
+
exe 'vert 7resize ' . ((&columns * 90 + 136) / 272)
|
561
|
+
exe '8resize ' . ((&lines * 14 + 31) / 62)
|
562
|
+
exe 'vert 8resize ' . ((&columns * 90 + 136) / 272)
|
563
|
+
exe '9resize ' . ((&lines * 14 + 31) / 62)
|
564
|
+
exe 'vert 9resize ' . ((&columns * 90 + 136) / 272)
|
512
565
|
tabnext 1
|
513
566
|
if exists('s:wipebuf')
|
514
567
|
silent exe 'bwipe ' . s:wipebuf
|
data/exe/return_to_sesh
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
system File.expand_path(File.join(__dir__, 'return_to_sesh.applescript'))
|
2
|
+
system File.expand_path(File.join(__dir__, 'return_to_sesh.applescript')) + ' &'
|
data/lib/sesh/cli.rb
CHANGED
@@ -255,3 +255,9 @@ module Sesh
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
end
|
258
|
+
|
259
|
+
def deep_symbolize(h)
|
260
|
+
return h.inject({}){|memo,(k,v)| memo[k.to_sym] = deep_symbolize(v); memo} if h.is_a? Hash
|
261
|
+
return h.inject([]){|memo,v | memo << deep_symbolize(v); memo} if h.is_a? Array
|
262
|
+
return h
|
263
|
+
end
|
data/lib/sesh/inferences.rb
CHANGED
@@ -31,7 +31,7 @@ module Sesh
|
|
31
31
|
tmux_session_pid = `echo $TMUX | cut -d , -f 2`.strip
|
32
32
|
return if tmux_session_pid.length == 0
|
33
33
|
tmux_process_line =
|
34
|
-
`ps aux | grep tmux | grep #{tmux_session_pid}`.strip.lines.first
|
34
|
+
`ps aux | grep tmux | grep -v grep | grep #{tmux_session_pid}`.strip.lines.first
|
35
35
|
return if tmux_process_line.nil?
|
36
36
|
tmux_process_line.split('-s ')[-1].split(' -n')[0]
|
37
37
|
end
|
data/lib/sesh/tmux_control.rb
CHANGED
@@ -181,9 +181,10 @@ module Sesh
|
|
181
181
|
options[:command] ||= "#{rspec_cmd} #{options[:spec]}"
|
182
182
|
end
|
183
183
|
if options[:and_return]
|
184
|
-
options[:command] = "return_to_sesh
|
184
|
+
options[:command] = "return_to_sesh; #{options[:command]}"
|
185
185
|
end
|
186
186
|
inferred_location = Inferences.infer_tmux_location
|
187
|
+
# puts "Inferred location: #{inferred_location}"
|
187
188
|
if options[:pane].nil?
|
188
189
|
if inferred_location[:project] == @project then system options[:command]
|
189
190
|
else interrupt_and_send_command_to_project! options[:command] end
|
data/lib/sesh/version.rb
CHANGED