Skip to content

Commit

Permalink
Use new elvish default config location
Browse files Browse the repository at this point in the history
Moves aliases config to `~/.config/elvish/aliases`

Ref zzamboni#22
  • Loading branch information
mvllow committed Jun 20, 2022
1 parent 6c9fab6 commit f050240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion alias.elv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use re
use str

var dir = ~/.elvish/aliases
var dir = ~/.config/.elvish/aliases

var arg-replacer = '{}'

Expand Down
4 changes: 2 additions & 2 deletions alias.org
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The =alias:save= command can receive one or more alias names, or with the =&all=
alias:save &verbose &all
#+end_src

When saved, each alias is stored in a separate file under =$alias:dir= (=~/.elvish/aliases/= by default). Saved aliases are automatically loaded when the module initializes.
When saved, each alias is stored in a separate file under =$alias:dir= (=~/.config/.elvish/aliases/= by default). Saved aliases are automatically loaded when the module initializes.

Note that due to Elvish's scoping rules, if you want to use a module from your alias, you need to load the module as well by specifying the =&use= option when defining the alias, which receives a list of module names to load, like this:

Expand Down Expand Up @@ -123,7 +123,7 @@ alias:rm alias
The =alias:dir= variable determines where the alias files will be saved.

#+begin_src elvish
var dir = ~/.elvish/aliases
var dir = ~/.config/.elvish/aliases
#+end_src

The =alias:arg-replacer= variable contains the string that will be used to indicate where the arguments will be inserted in the alias expansion.
Expand Down

0 comments on commit f050240

Please # to comment.