Skip to content

Commit 62d33ae

Browse files
authored
Merge pull request #113 from legendu-net/dev
Merge dev into main
2 parents 6a508f6 + 921f39e commit 62d33ae

File tree

6 files changed

+57
-51
lines changed

6 files changed

+57
-51
lines changed

.idx/dev.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
util-linux
1212
go
1313
uv
14+
dos2unix
1415
];
1516
env = {};
1617
services.docker.enable = true;

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// Update icon.
1010
func version(cmd *cobra.Command, args []string) {
11-
fmt.Println("0.25.0")
11+
fmt.Println("0.25.1")
1212
}
1313

1414
var versionCmd = &cobra.Command{

completion/completion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def gen_completion_script_ldc() -> None:
2828
print("Generate completion script for ldc...")
2929
completely = 'docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/completely'
3030
cmd = f"""{completely} preview > completely.bash \
31+
&& dos2unix completely.bash \
3132
&& mv completely.bash ../utils/data/bash-it/ldc.completion.bash
3233
"""
3334
sp.run(cmd, shell=True, check=True)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
. ./icon.completion.bash
2-
. ./ldc.completion.bash
1+
. ~/.bash_it/completion/icon.completion.bash
2+
. ~/.bash_it/completion/ldc.completion.bash

utils/data/bash-it/custom.plugins.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ function cs() {
1010
_cs.usage
1111
return 0
1212
fi
13-
cd "$@"
13+
local dir="$@"
14+
if [[ -f "$dir" ]]; then
15+
dir="$(dirname "$dir")"
16+
fi
17+
cd "$dir"
1418
ls --color=auto
1519
}
1620

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
# ldc completion -*- shell-script -*-
2-
3-
# This bash completions script was generated by
4-
# completely (https://github.com/dannyben/completely)
5-
# Modifying it manually is not recommended
6-
7-
_ldc_completions_filter() {
8-
local words="$1"
9-
local cur=${COMP_WORDS[COMP_CWORD]}
10-
local result=()
11-
12-
if [[ "${cur:0:1}" == "-" ]]; then
13-
echo "$words"
14-
15-
else
16-
for word in $words; do
17-
[[ "${word:0:1}" != "-" ]] && result+=("$word")
18-
done
19-
20-
echo "${result[*]}"
21-
22-
fi
23-
}
24-
25-
_ldc_completions() {
26-
local cur=${COMP_WORDS[COMP_CWORD]}
27-
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
28-
local compline="${compwords[*]}"
29-
30-
case "$compline" in
31-
'dclong/jupyterhub-ds'*)
32-
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
33-
;;
34-
35-
'dclong/vscode-server'*)
36-
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
37-
;;
38-
39-
*)
40-
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "dclong/jupyterhub-ds dclong/vscode-server -d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
41-
;;
42-
43-
esac
44-
} &&
45-
complete -F _ldc_completions ldc
46-
47-
# ex: filetype=sh
1+
# ldc completion -*- shell-script -*-
2+
3+
# This bash completions script was generated by
4+
# completely (https://github.com/dannyben/completely)
5+
# Modifying it manually is not recommended
6+
7+
_ldc_completions_filter() {
8+
local words="$1"
9+
local cur=${COMP_WORDS[COMP_CWORD]}
10+
local result=()
11+
12+
if [[ "${cur:0:1}" == "-" ]]; then
13+
echo "$words"
14+
15+
else
16+
for word in $words; do
17+
[[ "${word:0:1}" != "-" ]] && result+=("$word")
18+
done
19+
20+
echo "${result[*]}"
21+
22+
fi
23+
}
24+
25+
_ldc_completions() {
26+
local cur=${COMP_WORDS[COMP_CWORD]}
27+
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
28+
local compline="${compwords[*]}"
29+
30+
case "$compline" in
31+
'dclong/jupyterhub-ds'*)
32+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
33+
;;
34+
35+
'dclong/vscode-server'*)
36+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
37+
;;
38+
39+
*)
40+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "dclong/jupyterhub-ds dclong/vscode-server -d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur")
41+
;;
42+
43+
esac
44+
} &&
45+
complete -F _ldc_completions ldc
46+
47+
# ex: filetype=sh

0 commit comments

Comments
 (0)