mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
feat: allow shell to execute command (useful for cd)
This commit is contained in:
parent
e63d55110e
commit
cb38df3c37
3 changed files with 22 additions and 4 deletions
|
|
@ -183,10 +183,10 @@ pub fn initialization(shell: &str, binary_path: &str, auto_alias: &str) {
|
|||
|
||||
let mut init = format!(
|
||||
"\
|
||||
_PR_LAST_COMMAND=\"{}\" \
|
||||
eval $(_PR_LAST_COMMAND=\"{}\" \
|
||||
_PR_ALIAS=\"{}\" \
|
||||
_PR_SHELL=\"{}\" \
|
||||
\"{}\"",
|
||||
\"{}\")",
|
||||
last_command, alias, shell, binary_path
|
||||
);
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ pub fn initialization(shell: &str, binary_path: &str, auto_alias: &str) {
|
|||
|
||||
match shell {
|
||||
"bash" | "zsh" => {
|
||||
init = format!(r#"alias {}='{}'"#, auto_alias, init);
|
||||
init = format!(r#"alias {}=eval '$({})'"#, auto_alias, init);
|
||||
}
|
||||
"fish" => {
|
||||
init = format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue