dotfiles
bugabingas dorkfiles
owned by bugabinga
initial svn externs and completions for `svn`
2864ecbf0c3861873331da31bb83a8d941d8b2c2
Oliver Jan Krylow <olver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (7)
1 1 ##
Commands to remember 3 4 - ouch: compress and decompress archives
4 5 - sd: search and replace
5 6 - fd: find files recursively
30 31 - comrak: render markdown to html
31 32 - hx: terminal code editor
32 33 - xplr: terminal file explorer
34 +- coreutils: rust unix tools
35 +- t-rec: terminal gifs
36 +- podcast: podcast manager
37 +- sic: image manipulation
38 +- vivid: generate LS_COLORS
39 +- chars: unicode character info
40 +- hwatch: watch output of commands over time
41 +- franklin-cli: evolutionary image filter
nushell/completions/svn.complete.nu
Addednew file mode 100644 1 +def "complete svn subcommands" [] {
4 + | skip until { | line |
$line | str starts-with
"Available subcommands:" }
6 + |
each { |line|
$line | str trim }
7 + | take until { |line|
$line | empty? }
12 +def "complete svn add paths" [] {
13 + ^svn status --depth files
15 + | parse
"{mode} {file}" 21 +def "complete svn revert paths" [] {
22 + ^svn status --depth files
24 + | parse
"{mode} {file}" 30 +def "complete svn depth" [] { [
'empty',
'files',
'immediates',
'infinity'] }
32 +def "complete svn changelists" [] {
33 + ^svn status --depth files
35 + | parse
"--- Changelist '{changelist}':" 36 + | get --ignore-errors changelist
42 + subcommand?: string@
"complete svn subcommands" 50 +export extern "svn help" [
51 + subcommand?: string@
"complete svn subcommands" 60 +export extern "svn add" [
61 + paths: path@
"complete svn add paths" 64 + --depth: string@
"complete svn depth" 73 +export extern "svn revert" [
74 + paths: path@
"complete svn revert paths" 77 + --depth: string@
"complete svn depth" 79 + --changelist: string@
"complete svn changelists" nushell/config.nu
Modified 11 +use svn.complete.nu *
12 15 let default_theme = {
271 - def "complete svn subcommands" [] {
274 - | skip until { | line |
$line | str starts-with
"Available subcommands:" }
276 - |
each { |line|
$line | str trim }
277 - | take until { |line|
$line | empty? }
282 - def "complete svn add paths" [] {
283 - ^svn status --depth files
285 - | parse
"{mode} {file}" 291 - def "complete svn revert paths" [] {
292 - ^svn status --depth files
294 - | parse
"{mode} {file}" 300 - def "complete svn depth" [] { [
'empty',
'files',
'immediates',
'infinity'] }
302 - def "complete svn changelists" [] {
303 - ^svn status --depth files
305 - | parse
"--- Changelist '{changelist}':" 306 - | get --ignore-errors changelist
311 - export extern svn [
312 - subcommand?: string@
"complete svn subcommands" 320 - export extern "svn help" [
321 - subcommand?: string@
"complete svn subcommands" 330 - export extern "svn add" [
331 - paths: path@
"complete svn add paths" 333 - --non-recursive(-N)
334 - --depth: string@
"complete svn depth" 343 - export extern "svn revert" [
344 - paths: path@
"complete svn revert paths" 347 - --depth: string@
"complete svn depth" 349 - --changelist: string@
"complete svn changelists" nushell/modules/environment.nu
Modified 1 +export env GO111MODULE {
"on" }
2 +export env GOPATH { (
$nu.home-path | path join
'.go') }
6 + prepend (
$env.GOPATH | path join
'bin')
nushell/modules/svn.nu
Addednew file mode 100644 1 +def get-item-status-count [
3 + item_status_filter: string
5 + let target_status_count = (
$svn_status | get status.children.target.children.entry.children.wc-status.attributes | compact | flatten | flatten |
where item ==
$item_status_filter | length )
7 + let changelist_status_count = (
$svn_status | get --ignore-errors status.children.changelist.children.entry.children.wc-status.attributes | compact | flatten | flatten |
where item ==
$item_status_filter | length )
8 + $target_status_count +
$changelist_status_count 14 +export def-env svnstat [
19 + let svn_status = (^svn status --xml
$path | from xml)
20 + let svn_info = (^svn info --xml
$path | from xml)
22 + "path": (
$svn_info | get info.children.entry.attributes.path | path expand )
23 + "working_copy_root_path": (
$svn_info | get info.children.entry.children.wc-info.children.wcroot-abspath.children | flatten | flatten | flatten | compact )
24 + "url": (
$svn_info | get info.children.entry.children.url.children | flatten | flatten | compact )
25 + "relative_url": (
$svn_info | get info.children.entry.children.relative-url.children | flatten | flatten | compact )
26 + "repository_root": (
$svn_info | get info.children.entry.children.repository.children.root.children | flatten | flatten | flatten | compact )
27 + "repository_uuid": (
$svn_info | get info.children.entry.children.repository.children.uuid.children | flatten | flatten | flatten | compact )
28 + "revision": (
$svn_info | get info.children.entry.attributes.revision )
29 + "node_kind": (
$svn_info | get info.children.entry.attributes.kind )
30 + "schedule": (
$svn_info | get info.children.entry.children.wc-info.children.schedule.children | flatten | flatten | flatten | compact )
31 + "last_changed_author": (
$svn_info | get info.children.entry.children.commit.children.author.children | flatten | flatten | flatten | compact )
32 + "last_changed_rev": (
$svn_info | get info.children.entry.children.commit.attributes.revision | flatten | compact )
33 + "last_changed_date": (
$svn_info | get info.children.entry.children.commit.children.date.children | flatten | flatten | flatten | compact| into datetime )
34 + "added": ( get-item-status-count
$svn_status "added" )
35 + "conflicted":
"TODO" 36 + "deleted": ( get-item-status-count
$svn_status "deleted" )
37 + "ignored": ( get-item-status-count
$svn_status "ignored" )
38 + "modified": ( get-item-status-count
$svn_status "modified" )
40 + "unversioned_external":
"TODO" 41 + "unversioned": ( get-item-status-count
$svn_status "unversioned" )
42 + "missing": ( get-item-status-count
$svn_status "missing" )
43 + "obstructed":
"TODO" 44 + "tree_conflicts": (
$svn_status | get --ignore-errors status.children.target.children.entry.children.wc-status.attributes.tree-conflicted | flatten | flatten | compact | length)
45 + "changelists": (
$svn_status | get --ignore-errors status.children.changelist | compact | flatten | get name )
nushell/modules/table.nu
Modified 3 3 export def "has-column?" [
6 - pivot | any? Column0 ==
$name 6 + transpose | any? Column0 ==
$name nushell/modules/todo.nu
Modified5 5 export def todo [] { mdcat (
$env.DOTFILES | path join
"TODO.md") }
7 7 export def "todo edit" [] { hx (
$env.DOTFILES | path join
"TODO.md")}
9 9 export def "todo commands" [] { mdcat (
$env.DOTFILES | path join
"COMMANDS.md") }
11 +export def "todo commands edit" [] { hx (
$env.DOTFILES | path join
"COMMANDS.md") }