Skip to content

Commit

Permalink
bash cmd-not-found-handler typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Oct 7, 2023
1 parent 309a38a commit 882748e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/modes/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { blurple, dim } from "../utils/color.ts"
import undent from 'outdent'
const { usePantry } = hooks

// * maybe impl `$XDG_BIN_HOME`

export default async function(pkgs: PackageRequirement[]) {
const usrlocal = new Path("/usr/local/bin")
let n = 0
Expand Down
7 changes: 5 additions & 2 deletions src/modes/shellcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { flatmap } from "pkgx/utils/misc.ts";
// * `command_not_found_handler` cannot change the global environment hence we write a file

// TODO
// * maybe impl `$XDG_BIN_HOME`
// ref https://gitlab.freedesktop.org/xdg/xdg-specs/-/issues/14
// * remove the files we create for command not found handler once any prompt appears
// * need to use a proper tmp location perhaps
Expand Down Expand Up @@ -38,7 +37,7 @@ export default function() {
if type _pkgx_reset >/dev/null 2>&1; then
_pkgx_reset
fi
unset -f _pkgx_chpwd_hook _pkgx_should_deactivate_devenv pkgx x command_not_found_handler pkgx@latest _pkgx_commit _pkgx_dev_off >/dev/null 2>&1
unset -f _pkgx_chpwd_hook _pkgx_should_deactivate_devenv pkgx x command_not_found_handler command_not_found_handle pkgx@latest _pkgx_commit _pkgx_dev_off >/dev/null 2>&1
echo "pkgx: shellcode unloaded" >&2;;
*)
command pkgx "$@";;
Expand Down Expand Up @@ -159,6 +158,10 @@ export default function() {
_pkgx_chpwd_hook
}
command_not_found_handle() {
command_not_found_handler "$@"
}
_pkgx_chpwd_hook'
else
POSIXLY_CORRECT=y
Expand Down

0 comments on commit 882748e

Please sign in to comment.