diff --git a/docs/changelog.rst b/docs/changelog.rst index de56314f5..8ee8c861c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -202,6 +202,9 @@ Detailed list of changes - icat kitten: When catting multiple images display the images in input order (:iss:`9413`) +- kitten @: Fix relative paths for --password-file being resolved relative to + CWD instead of the kitty config directory + 0.45.0 [2025-12-24] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tools/cmd/at/main.go b/tools/cmd/at/main.go index 7ee108b39..1b328579f 100644 --- a/tools/cmd/at/main.go +++ b/tools/cmd/at/main.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "os" + "path/filepath" "reflect" "strconv" "strings" @@ -339,6 +340,9 @@ func get_password(password string, password_file string, password_env string, us } } else { var q []byte + if !filepath.IsAbs(password_file) { + password_file = filepath.Join(utils.ConfigDir(), password_file) + } q, err = os.ReadFile(password_file) if err == nil { ans.is_set, ans.val = true, strings.TrimRight(string(q), " \n\t")