Màj elvish 0.20 + ajout lsd comme possibilité pour ls + changement des VPNs persos + helix comme éditeur par défaut
This commit is contained in:
parent
1c8457f7ec
commit
f98a134d40
|
@ -1,9 +1,10 @@
|
|||
use re
|
||||
use str
|
||||
|
||||
fn -check {|f|
|
||||
use str
|
||||
var @missings = (try {
|
||||
doas ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m }
|
||||
doas ldd $f 2>/dev/null | grep 'not found' | re:awk {|_ m @_| put $m }
|
||||
} catch e {
|
||||
})
|
||||
if (> (count $missings) 1) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
edit:add-var cleankh~ {|@argv|
|
||||
use re
|
||||
use str
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/common
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/ip
|
||||
|
@ -14,7 +15,7 @@ edit:add-var cleankh~ {|@argv|
|
|||
if (not (str:has-prefix $l '#')) {
|
||||
put $l
|
||||
}
|
||||
} | eawk {|_ host @rest|
|
||||
} | re:awk {|_ host @rest|
|
||||
var id = (str:join ' ' $rest)
|
||||
var ihosts = []
|
||||
str:split ',' $host | each {|h|
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
edit:add-var digall~ {|@argv|
|
||||
use re
|
||||
use str
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/common
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/format
|
||||
|
@ -44,7 +45,7 @@ edit:add-var digall~ {|@argv|
|
|||
}
|
||||
|
||||
fn format {|results|
|
||||
eawk {|_ @args|
|
||||
re:awk {|_ @args|
|
||||
put [ $args[0] (all $args[2..]) ]
|
||||
} $results | list:remove-duplicate | list:sort {|l1 l2|
|
||||
var c = (compare $l1[0] $l2[0])
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
edit:add-var ipof~ {|@argv|
|
||||
use re
|
||||
use str
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/common
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/ip
|
||||
|
@ -52,7 +53,7 @@ edit:add-var ipof~ {|@argv|
|
|||
if (and (not-eq $ll '') (not-eq $ll[0] '#')) {
|
||||
put $ll
|
||||
}
|
||||
} | eawk {|_ ip @domains|
|
||||
} | re:awk {|_ ip @domains|
|
||||
peach {|d|
|
||||
var dd = $d
|
||||
if (has-key $hosts $dd) {
|
||||
|
|
|
@ -14,6 +14,14 @@ fn -exal {|@argv|
|
|||
-exa -lghH@ --time-style long-iso $@argv
|
||||
}
|
||||
|
||||
fn -lsd {|@argv|
|
||||
e:lsd --color auto --group-directories-first --date +'%Y.%m.%d %H:%M' $@argv
|
||||
}
|
||||
|
||||
fn -lsdl {|@argv|
|
||||
-lsd -lg --header $@argv
|
||||
}
|
||||
|
||||
var cmd = $-exa~
|
||||
var cmdl = $-exal~
|
||||
|
||||
|
@ -21,6 +29,9 @@ edit:add-var ls~ {|@argv| $cmd $@argv }
|
|||
#edit:add-var la~ {|@argv| $cmd -a $@argv }
|
||||
#edit:add-var ll~ {|@argv| $cmd -lh $@argv }
|
||||
#edit:add-var lla~ {|@argv| $cmd -lha $@argv }
|
||||
edit:add-var la~ {|@argv| $cmd -aa $@argv }
|
||||
edit:add-var ll~ {|@argv| $cmdl -l $@argv }
|
||||
edit:add-var lla~ {|@argv| $cmdl -aa $@argv }
|
||||
#edit:add-var la~ {|@argv| $cmd -aa $@argv }
|
||||
#edit:add-var ll~ {|@argv| $cmdl -l $@argv }
|
||||
#edit:add-var lla~ {|@argv| $cmdl -aa $@argv }
|
||||
edit:add-var la~ {|@argv| $cmd -a $@argv }
|
||||
edit:add-var ll~ {|@argv| $cmdl $@argv }
|
||||
edit:add-var lla~ {|@argv| $cmdl -a $@argv }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var app = 'nvim'
|
||||
var app = 'helix'
|
||||
|
||||
var editors = [
|
||||
&emac=[
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use re
|
||||
use str
|
||||
use framagit.org/benjamin.vaudour/elv-lib/mods/list
|
||||
|
||||
|
@ -7,8 +8,8 @@ var vpnType = [
|
|||
]
|
||||
|
||||
var shortcut = [
|
||||
&ca=ca.kaosx.cf
|
||||
&fr=fr.kaosx.cf
|
||||
&ca=ca.kaosx.ovh
|
||||
&fr=fr.kaosx.ovh
|
||||
&lu=luence-wg
|
||||
&lu2=luence-ovpn
|
||||
&cli=luence-client
|
||||
|
@ -18,8 +19,8 @@ var shortcut = [
|
|||
]
|
||||
|
||||
var next = [
|
||||
&ca.kaosx.cf=fr.kaosx.cf
|
||||
&fr.kaosx.cf=luence-wg
|
||||
&ca.kaosx.ovh=fr.kaosx.ovh
|
||||
&fr.kaosx.ovh=luence-wg
|
||||
&luence-wg=luence-client
|
||||
&luence-ovpn=luence-client
|
||||
# &luence-client=proton_nl5
|
||||
|
@ -32,7 +33,7 @@ fn -list {|&active=$false|
|
|||
if $active {
|
||||
set @argv = $@argv --active
|
||||
}
|
||||
nmcli $@argv | eawk {|_ @name uuid tpe dev|
|
||||
nmcli $@argv | re:awk {|_ @name uuid tpe dev|
|
||||
if (has-key $vpnType $tpe) {
|
||||
str:join ' ' $name
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ fn -next {||
|
|||
if (== 1 (count $n)) {
|
||||
put $next[$n[0]]
|
||||
} else {
|
||||
put ca.kaosx.cf
|
||||
put ca.kaosx.ovh
|
||||
}
|
||||
}
|
||||
|
||||
|
|
6
rc.elv
6
rc.elv
|
@ -1,10 +1,12 @@
|
|||
#set-env BAT_THEME Coldark-Cold
|
||||
set-env BAT_PAGER 'less -RF'
|
||||
set-env EXA_COLORS 'da=36:*.pdf=4:*.doc=4:*.xls=4:*.docx=4:*.xlsx=4:*.odt=4:*.ods=4'
|
||||
set-env EDITOR nvim
|
||||
#set-env EDITOR nvim
|
||||
set-env EDITOR vim
|
||||
#set-env EDITOR kak
|
||||
#set-env EDITOR hx
|
||||
set-env VISUAL 'nvim -R'
|
||||
#set-env VISUAL 'nvim -R'
|
||||
set-env VISUAL 'vim -R'
|
||||
#set-env VISUAL 'kak -ro'
|
||||
#set-env VISUAL hx
|
||||
set-env CURRENT_SHELL 'elvish'
|
||||
|
|
Loading…
Reference in New Issue