File tree 4 files changed +67
-1
lines changed
addon-metadata/pimp-my-shell
homeadditions/.local/share/fish/vendor_completions.d
homeadditions/.local/share/fish/vendor_completions.d
4 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : pimp-my-shell
2
2
repository : .
3
3
version : " "
4
- install_date : " 2024-04-01T19:41:31 -03:00"
4
+ install_date : " 2024-04-03T10:04:10 -03:00"
5
5
project_files :
6
6
- web-build/Dockerfile.pimp-my-shell
7
7
- homeadditions/.bashrc.d/pimp-my-shell.sh
@@ -10,6 +10,7 @@ project_files:
10
10
- commands/web/gum
11
11
- commands/host/fish
12
12
- homeadditions/.local/share/bash-completion/completions/ahoy
13
+ - homeadditions/.local/share/fish/vendor_completions.d/ahoy.fish
13
14
- homeadditions/.config/starship.toml
14
15
- homeadditions/.config/fish/conf.d/z.fish
15
16
- pimp-my-shell/hooks/README.md
Original file line number Diff line number Diff line change
1
+ # ddev-generated
2
+
3
+ # @TODO: Try to use ahoy -f as part of the commands so autocomplete works with that
4
+ # was playing with `ahoy --help | sed -z 's/.*COMMANDS:\(.*\)GLOBAL.*/\1/' | cut -d ' ' -f 4'`
5
+ # to extract commands instead of --generate-bash-completion but needs more work
6
+ # apparently argparse can be used to extract the file parameter.
7
+
8
+ function __fish_ahoy_subcommand
9
+ set -l cmd (commandline )
10
+ eval $cmd --generate-bash-completion | grep -vw h | grep -vw help
11
+ end
12
+
13
+ function __fish_ahoy_config
14
+ set -l cmd (commandline -ct )
15
+ echo " cmd: $cmd " >> debug.txt
16
+ set -l dirglob " "
17
+ set -l dirfind " ."
18
+ if test -d (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
19
+ set dirglob (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
20
+ set dirfind (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
21
+ end
22
+ set -l configs $dirglob .* .yml $dirglob .* .yaml $dirglob .* .yml $dirglob * .yaml
23
+ for i in $configs
24
+ echo $i
25
+ end
26
+ find $dirfind -mindepth 1 -maxdepth 1 -type d | sed ' s/\ .\ /\ (.*\ )/\ 1/g' | sed ' s/$/\ //g' | sort
27
+ end
28
+
29
+ complete -c ahoy -f
30
+ complete -c ahoy -n " not __fish_seen_subcommand_from (ahoy --generate-bash-completion)" -a " (ahoy --generate-bash-completion)"
31
+ complete -c ahoy -n " __fish_seen_subcommand_from (ahoy -h | grep ▼ | cut -d ' ' -f 4)" -a " (__fish_ahoy_subcommand)"
32
+ complete -c ahoy -s f -l file -x -a " (__fish_ahoy_config)"
Original file line number Diff line number Diff line change
1
+ # ddev-generated
2
+
3
+ # @TODO: Try to use ahoy -f as part of the commands so autocomplete works with that
4
+ # was playing with `ahoy --help | sed -z 's/.*COMMANDS:\(.*\)GLOBAL.*/\1/' | cut -d ' ' -f 4'`
5
+ # to extract commands instead of --generate-bash-completion but needs more work
6
+ # apparently argparse can be used to extract the file parameter.
7
+
8
+ function __fish_ahoy_subcommand
9
+ set -l cmd (commandline )
10
+ eval $cmd --generate-bash-completion | grep -vw h | grep -vw help
11
+ end
12
+
13
+ function __fish_ahoy_config
14
+ set -l cmd (commandline -ct )
15
+ echo " cmd: $cmd " >> debug.txt
16
+ set -l dirglob " "
17
+ set -l dirfind " ."
18
+ if test -d (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
19
+ set dirglob (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
20
+ set dirfind (string replace -r ' (.*)/[^\ /]*$' ' $1/' $cmd )
21
+ end
22
+ set -l configs $dirglob .* .yml $dirglob .* .yaml $dirglob .* .yml $dirglob * .yaml
23
+ for i in $configs
24
+ echo $i
25
+ end
26
+ find $dirfind -mindepth 1 -maxdepth 1 -type d | sed ' s/\ .\ /\ (.*\ )/\ 1/g' | sed ' s/$/\ //g' | sort
27
+ end
28
+
29
+ complete -c ahoy -f
30
+ complete -c ahoy -n " not __fish_seen_subcommand_from (ahoy --generate-bash-completion)" -a " (ahoy --generate-bash-completion)"
31
+ complete -c ahoy -n " __fish_seen_subcommand_from (ahoy -h | grep ▼ | cut -d ' ' -f 4)" -a " (__fish_ahoy_subcommand)"
32
+ complete -c ahoy -s f -l file -x -a " (__fish_ahoy_config)"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ project_files:
7
7
- commands/web/gum
8
8
- commands/host/fish
9
9
- homeadditions/.local/share/bash-completion/completions/ahoy
10
+ - homeadditions/.local/share/fish/vendor_completions.d/ahoy.fish
10
11
- homeadditions/.config/starship.toml
11
12
- homeadditions/.config/fish/conf.d/z.fish
12
13
- pimp-my-shell/hooks/README.md
You can’t perform that action at this time.
0 commit comments