repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

nushell: remove buggy svn completions

d91fa41ca5b7216e6d1dc3160e4410e291823b8b

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

nushell/completions/svn-completions.nu

Deleted
deleted file mode 100644
1 -def "complete svn subcommands" [] {
2 - ^svn help
3 - | lines
4 - | skip until { | line | $line | str starts-with "Available subcommands:" }
5 - | skip 1
6 - | each { |line| $line | str trim }
7 - | take until { |line| $line | empty? }
8 - | split column " "
9 - | get column1
12 -# TODO: parse xml output
14 -def "complete svn add paths" [] {
15 - ^svn status --depth infinity
16 - | lines
17 - | parse "{mode} {file}"
18 - | str trim
19 - | where mode == ?
20 - | get file
23 -def "complete svn revert paths" [] {
24 - ^svn status --depth infinity
25 - | lines
26 - | parse "{mode} {file}"
27 - | where mode == M
28 - | str trim
29 - | get file
32 -def "complete svn depth" [] { ['empty', 'files', 'immediates', 'infinity'] }
34 -def "complete svn changelists" [] {
35 - ^svn status --depth infinity
36 - | lines
37 - | parse "--- Changelist '{changelist}':"
38 - | get --ignore-errors changelist
41 -# FIXME: This is commented out in order to leave unexterne'd commands be.
42 -#
43 -# Subversion is a tool for version control.
44 -# For additional information, see http://subversion.apache.org/
45 -#export extern svn [
46 - #subcommand?: string@"complete svn subcommands" # for help on a specific subcommand.
47 - #--version # to see the program version and RA modules
48 - #--quiet # to see just the version number
49 - #--verbose # to see dependency versions as well
50 -#]
52 -# help (?, h): Describe the usage of this program or its subcommands.
53 -# usage: help [SUBCOMMAND...]
54 -export extern "svn help" [
55 - subcommand?: string@"complete svn subcommands" # for help on a specific subcommand.
56 - --verbose(-v) # also show experimental subcommands and options
59 -# FIXME:
60 -# SVN has short options with double dashes: --changelist(--cl).
61 -# This is not allowed in nu.
63 -# FIXME:
64 -# Multiline doccomments will be rendered without the newlines.
66 -# Print the status of working copy files and directories.
67 -export extern "svn status" [
68 - ...paths: path # PATHs
69 - --show-updates(-u) # display update information
70 - --verbose(-v) # print extra information
71 - --depth: string@"complete svn depth" # limit operation by depth ARG ('empty', 'files', 'immediates', or 'infinity')
72 - --revision(-r): string # ARG (some commands also take ARG1:ARG2 range)
73 - # A revision argument can be one of:
74 - # NUMBER revision number
75 - # '{' DATE '}' revision at start of the date
76 - # 'HEAD' latest in repository
77 - # 'BASE' base rev of item's working copy
78 - # 'COMMITTED' last commit at or before BASE
79 - # 'PREV' revision just before COMMITTED
80 - --quiet(-q) # don't print unversioned items
81 - --no-ignore # disregard default and svn:ignore and svn:global-ignores property ignores
82 - --incremental # give output suitable for concatenation
83 - --xml # output in XML
84 - --ignore-externals # ignore externals definitions
85 - --changelist:string@"complete svn changelists" # operate only on members of changelist ARG
88 -# FIXME: https://github.com/nushell/nushell/issues/5012
89 -# rest parameters do not play well with completions yet
90 -# the `paths` parameter should be `...paths`
92 -# Put new files and directories under version control.
93 -export extern "svn add" [
94 - paths: path@"complete svn add paths" # unversioned PATHs for addition
95 - --targets: path # pass contents of file ARG as additional args
96 - --non-recursive(-N) # obsolete; same as --depth=empty
97 - --depth: string@"complete svn depth" # limit operation by depth ARG ('empty', 'files', 'immediates', or 'infinity')
98 - --quiet(-q) # print nothing, or only summary information
99 - --force # ignore already versioned paths
100 - --no-ignore # disregard default and svn:ignore and svn:global-ignores property ignores
101 - --auto-props # enable automatic properties
102 - --no-auto-props # disable automatic properties
103 - --parents # add intermediate parents
106 -# Restore pristine working copy state (undo local changes).
107 -export extern "svn revert" [
108 - paths: path@"complete svn revert paths"
109 - --targets: path # pass contents of file as additional args
110 - --recursive(-R) # descend recursively, same as --depth=infinity
111 - --depth: string@"complete svn depth" # limit operation by depth ARG ('empty', 'files', 'immediates', or 'infinity')
112 - --quiet(-q) # print nothing, or only summary information
113 - --changelist: string@"complete svn changelists" # operate only on members of changelist ARG
114 - --remove-added # reverting an added item will remove it from disk
117 -# FIXME
118 -# SVN uses aliases for subcommands. E.g. `co` for `checkout`.
119 -# How to express that with nu extern commands?
121 -# Check out a working copy from a repository.
122 -export extern "svn checkout" [
123 - ...url_with_rev:string # source
124 - path: path # destination
125 - --revision(-r) # ARG (some commands also take ARG1:ARG2 range)
126 - # A revision argument can be one of:
127 - # NUMBER revision number
128 - # '{' DATE '}' revision at start of the date
129 - # 'HEAD' latest in repository
130 - # 'BASE' base rev of item's working copy
131 - # 'COMMITTED' last commit at or before BASE
132 - # 'PREV' revision just before COMMITTED
133 - --quiet(-q) # print nothing, or only summary information
134 - --depth: string@"complete svn depth" # limit operation by depth ARG ('empty', 'files', 'immediates', or 'infinity')
135 - --force # force operation to run
136 - --ignore-externals # ignore externals definitions

nushell/config.nu

Modified
10 10 use pacnew.nu
11 11 use syncthing.nu
13 -# CUSTOM COMPLETIONS
14 -use svn-completions.nu *
16 13 # for more information on themes see
17 14 # https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.md
18 15 let default_theme = {