mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-14 01:04:04 +00:00
Aliases respect the z-cmd arg (#70)
When changing the z-cmd to something like `j` instead, the aliases will also use `j` as a prefix, e.g. `ji`, `ja`.
This commit is contained in:
parent
4731533352
commit
f19aa07145
@ -59,15 +59,15 @@ end
|
|||||||
fn alias(z_cmd: &str) -> String {
|
fn alias(z_cmd: &str) -> String {
|
||||||
format!(
|
format!(
|
||||||
r#"
|
r#"
|
||||||
abbr -a zi '{} -i'
|
abbr -a {0}i '{0} -i'
|
||||||
|
|
||||||
abbr -a za 'zoxide add'
|
abbr -a {0}a 'zoxide add'
|
||||||
|
|
||||||
abbr -a zq 'zoxide query'
|
abbr -a {0}q 'zoxide query'
|
||||||
abbr -a zqi 'zoxide query -i'
|
abbr -a {0}qi 'zoxide query -i'
|
||||||
|
|
||||||
abbr -a zr 'zoxide remove'
|
abbr -a {0}r 'zoxide remove'
|
||||||
abbr -a zri 'zoxide remove -i'
|
abbr -a {0}ri 'zoxide remove -i'
|
||||||
"#,
|
"#,
|
||||||
z_cmd
|
z_cmd
|
||||||
)
|
)
|
||||||
|
@ -52,15 +52,15 @@ _z_cd() {{
|
|||||||
fn alias(z_cmd: &str) -> String {
|
fn alias(z_cmd: &str) -> String {
|
||||||
format!(
|
format!(
|
||||||
r#"
|
r#"
|
||||||
alias zi='{} -i'
|
alias {0}i='{0} -i'
|
||||||
|
|
||||||
alias za='zoxide add'
|
alias {0}a='zoxide add'
|
||||||
|
|
||||||
alias zq='zoxide query'
|
alias {0}q='zoxide query'
|
||||||
alias zqi='zoxide query -i'
|
alias {0}qi='zoxide query -i'
|
||||||
|
|
||||||
alias zr='zoxide remove'
|
alias {0}r='zoxide remove'
|
||||||
alias zri='zoxide remove -i'
|
alias {0}ri='zoxide remove -i'
|
||||||
"#,
|
"#,
|
||||||
z_cmd
|
z_cmd
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user