Skip to content

Commit

Permalink
wip: Add init subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Oct 6, 2023
1 parent 4085e55 commit 034ddb1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions lib/commands/command-init.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- sh -*-
# shellcheck source=lib/functions/plugins.bash
. "$(dirname "$(dirname "$0")")/lib/functions/plugins.bash"

init_command() {
local shell=$1
local dir
dir="$(dirname "$(dirname "$0")")"

case $shell in
sh)
cat "$dir/asdf.sh"
;;
bash)
cat "$dir/asdf.sh"
;;
zsh)
cat "$dir/asdf.sh"
;;
fish)
cat "$dir/asdf.fish"
;;
elvish)
cat "$dir/asdf.elv"
;;
nushell)
cat "$dir/asdf.nu"
;;
powershell)
cat "$dir/asdf.ps1"
;;
esac
}

init_command "$@"

0 comments on commit 034ddb1

Please sign in to comment.