From fbe878c3121ac4d3ab796b066cdb88a7050d08c7 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 3 Aug 2022 14:45:30 +0300 Subject: [PATCH] feat(console): add yc --- .bashrc | 10 ++++++++++ Console.org | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.bashrc b/.bashrc index a1bc9d1..0485dd3 100644 --- a/.bashrc +++ b/.bashrc @@ -150,3 +150,13 @@ if [[ -z "$SIMPLE" && "$TERM" != "dumb" ]]; then eval "$(starship init bash)" fi # Starship:1 ends here + +# [[file:Console.org::*Yandex Cloud][Yandex Cloud:1]] +init_yc () { + # The next line updates PATH for Yandex Cloud CLI. + if [ -f '/home/pavel/yandex-cloud/path.bash.inc' ]; then source '/home/pavel/yandex-cloud/path.bash.inc'; fi + + # The next line enables shell command completion for yc. + if [ -f '/home/pavel/yandex-cloud/completion.bash.inc' ]; then source '/home/pavel/yandex-cloud/completion.bash.inc'; fi +} +# Yandex Cloud:1 ends here diff --git a/Console.org b/Console.org index ccceea7..c2ef4dc 100644 --- a/Console.org +++ b/Console.org @@ -404,6 +404,16 @@ if [[ -z "$SIMPLE" && "$TERM" != "dumb" ]]; then eval "$(starship init bash)" fi #+end_src +*** Yandex Cloud +#+begin_src bash +init_yc () { + # The next line updates PATH for Yandex Cloud CLI. + if [ -f '/home/pavel/yandex-cloud/path.bash.inc' ]; then source '/home/pavel/yandex-cloud/path.bash.inc'; fi + + # The next line enables shell command completion for yc. + if [ -f '/home/pavel/yandex-cloud/completion.bash.inc' ]; then source '/home/pavel/yandex-cloud/completion.bash.inc'; fi +} +#+end_src * Fish :PROPERTIES: :header-args+: :tangle ./.config/fish/config.fish :comments link