Skip to content

Commit

Permalink
maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
jhheider committed Jul 27, 2023
1 parent 3fc11f5 commit f5e0166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app.magic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,12 @@ function shells(): [Path, string][] {

const std = (shell: string) => `source <(tea --magic=${shell}) #docs.tea.xyz/magic`

const bash = 'test -z "$TEA_HAS_RUN" && source /dev/stdin <<<"$(tea --magic=bash) && export TEA_HAS_RUN=1 #docs.tea.xyz/magic'

const candidates: [Path, string][] = [
[zdotdir.join(".zshrc"), std("zsh")],
[Path.home().join(".bashrc"), 'source /dev/stdin <<<"$(tea --magic=bash) #docs.tea.xyz/magic'],
[Path.home().join(".bashrc"), bash],
[Path.home().join(".bash_profile"), bash],
[xdg_dir.join("elvish/rc.elv"), std("elvish")],
[xdg_dir.join("fish/config.fish"), "tea --magic=fish | source #docs.tea.xyz/magic"],
]
Expand Down

0 comments on commit f5e0166

Please sign in to comment.