Skip to content

Commit

Permalink
pathfinder: prefer cd instead of eval
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Aug 18, 2024
1 parent aece5c4 commit 913878b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpp/project/pathfinder/src/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace fs = std::filesystem;
paf::alias::alias(lyra::cli& cli)
{
auto command = lyra::command("alias", [this](const lyra::group& group) { execute(group); })
.help("Print aliases `eval`able by a POSIX-compatible shell.")
.help("Print aliases for POSIX-compatible shells.")
.add_argument(lyra::help(m_show_help))
.optional();
cli.add_argument(std::move(command));
Expand Down Expand Up @@ -136,7 +136,7 @@ PAF_CMD_NORETURN void paf::alias::execute(const lyra::group& group)
}

std::cout << "m() { " << xph::exec_path << " mark \"$@\"; }\n";
std::cout << R"#(g() { eval "$()#" << xph::exec_path << ' '
std::cout << R"#(g() { cd "$()#" << xph::exec_path << ' '
<< R"#(jump "$@")"; })#"
"\n";
std::cout << "e() { " << xph::exec_path << " open \"$@\"; }\n";
Expand Down

0 comments on commit 913878b

Please sign in to comment.