Skip to content

Issue with -f: not resolving ~ or absolute paths #50

Description

@ph5i

Hey, I noticed that cook -f: doesn't seem to support ~ or absolute paths. When I try to use -f: ~/wordlists/test.txt or -f: /home/phsi/wordlists/test.txt, it just doesn't process the file. But if I specify the relative path like -f: test.txt or -f: ../wordlists/test.txt, it works fine.

Not a big deal since there's a workaround, but figured I'd report it.

Example:

# just to verify the file exists in both ~/tmp and /wordlists
[phsi@x] ~/tmp
❯ cat test.txt
test
database
lololol
yessir
word

[phsi@x] ~/tmp
❯ cat ~/wordlists/test.txt
test
database
lololol
yessir
word

# works fine when path is relative
[phsi@x] ~/tmp
❯ cook -f: test.txt -start get -end Data / start f.title end
/getTestData
/getDatabaseData
/getLolololData
/getYessirData
/getWordData

# also works fine when traversing paths
[phsi@x] ~/tmp
❯ cook -f: ../wordlists/test.txt -start get -end Data / start f.title end
/getTestData
/getDatabaseData
/getLolololData
/getYessirData
/getWordData

# does not work at all when using ~ or absolute path
[phsi@x] ~/tmp
❯ cook -f: ~/wordlists/test.txt -start get -end Data / start f.title end

[phsi@x] ~/tmp
❯ cook -f: /home/phsi/wordlists/test.txt -start get -end Data / start f.title end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions