{"id":16941025,"url":"https://github.com/halostatue/fish-utils","last_synced_at":"2025-09-06T17:46:07.316Z","repository":{"id":66021878,"uuid":"190675683","full_name":"halostatue/fish-utils","owner":"halostatue","description":"Fish utility functions","archived":false,"fork":false,"pushed_at":"2025-08-25T06:16:38.000Z","size":79,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-30T13:48:30.508Z","etag":null,"topics":["fish","fish-plugin","fish-shell","fisher"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halostatue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"halostatue","buy_me_a_coffee":"halostatue","ko_fi":"halostatue","tidelift":"rubygems/diff-lcs"}},"created_at":"2019-06-07T02:03:31.000Z","updated_at":"2025-08-27T18:13:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"adb0582f-6bc9-4b9f-9c17-e94a12297882","html_url":"https://github.com/halostatue/fish-utils","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/halostatue/fish-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halostatue%2Ffish-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halostatue%2Ffish-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halostatue%2Ffish-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halostatue%2Ffish-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halostatue","download_url":"https://codeload.github.com/halostatue/fish-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halostatue%2Ffish-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273940310,"owners_count":25195096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fish","fish-plugin","fish-shell","fisher"],"created_at":"2024-10-13T21:08:31.142Z","updated_at":"2025-09-06T17:46:07.230Z","avatar_url":"https://github.com/halostatue.png","language":"Shell","funding_links":["https://github.com/sponsors/halostatue","https://buymeacoffee.com/halostatue","https://ko-fi.com/halostatue","https://tidelift.com/funding/github/rubygems/diff-lcs"],"categories":[],"sub_categories":[],"readme":"# halostatue/fish-utils\n\n[![Version][version]](https://github.com/halostatue/fish-utils/releases)\n\nUtility functions for [fish shell][shell].\n\n## Installation\n\nInstall with [Fisher][Fisher].\n\n```fish\nfisher install halostatue/fish-utils@v4\n```\n\n### System Requirements\n\n- [fish][fish] 3.4+\n\n## Functions\n\n### `clone-tree`\n\nClones the entire directory structure of a `SOURCE` directory into another,\nusing tar with pipes. If `TARGET` does not exist, it will be created.\n\n```fish\nclone-tree SOURCE TARGET\n```\n\n#### `clone-tree` flags\n\n- `-p`, `--progress`: Enables the display of a progress bar. If `pv` is not\n  available, acts the same as `--verbose`. Mutually exclusive with `--verbose`.\n\n- `-v`, `--verbose`: Shows a verbose extract display. Mutually exclusive with\n  `--verbose`.\n\n- `-k`, `--keep-root`: If provided, keeps the source directory as the root of\n  the target files. That is, `clone-tree --keep-root SOURCE TARGET` will produce\n  the output of `TARGET/(basename SOURCE)/...`.\n\n### `dataurl`\n\nCreates a data URL (base 64 encoded) for the contents of the provided file.\n\n```fish\ndataurl --copy image.jpg\n```\n\n#### `dataurl` flags\n\n- `copy`: Copy the resulting data URL to the clipboard in addition to printing\n  it.\n\n- `property`: Specify the property for this data URL.\n\n### `latest_modified_file`\n\nGiven a list of files, returns the file that was most recently updated by\n`mtime`. Because of limitations of fish, it is not possible to pass wild cards\nthat have no match to this function without first assigning them to a variable.\n\n```fish\necho (latest_modified_file Rakefile Gemfile) # Rakefile\nset -l files Rakefile lib/tasks/*.rake\necho (latest_modified_file $files) # lib/tasks/test.rake\n```\n\n### `max`, `__max`, `min`, and `__min`\n\nPrints the maximum/minimum value from the provided list.\n\nThe comparison must be done on numeric values, but comparisons can be done with\nthe `--using` option to specify a program and arguments to run against the\nprovided list.\n\n```fish\n$ max 31 25 92 32\n92\n$ min 31 25 92 32\n25\n$ max --using 'path mtime' *.md\nCHANGELOG.md\n$ max --using 'path mtime' *.md\nLICENCE.md\n```\n\n#### `max`, `__max`, `min`, and `__min` flags\n\n- `-u`, `--using`: A string representing the command to be run to get a numeric\n  value for comparison.\n\n### `md5pwd`\n\nCreates an MD5 hash for the current working directory.\n\n### `mess`\n\nCreates a working 'mess' directory where new things may be played with.\n\n## `pidwd`\n\nPrints the current working directory of the provided PID.\n\n```fish\ntest (pidwd $fish_pid) = $PWD; and echo Works\n```\n\n## `rot13`\n\nA simple/simplistic Caesar cipher.\n\n```fish\necho N fvzcyr/fvzcyvfgvp Pnrfne pvcure. | rot13\n```\n\n## `urlencode`\n\nURL encodes the provided string.\n\n## Licence\n\n[MIT](./LICENCE.md)\n\n## Change Log\n\n[CHANGELOG](./CHANGELOG.md)\n\n## Contributing\n\n- [Contributing](./CONTRIBUTING.md)\n- [Contributors](./CONTRIBUTORS.md)\n- [Code of Conduct](./CODE_OF_CONDUCT.md)\n\n[fisher]: https://github.com/jorgebucaran/fisher\n[fish]: https://github.com/fish-shell/fish-shell\n[shell]: https://fishshell.com 'friendly interactive shell'\n[version]: https://img.shields.io/github/tag/halostatue/fish-utils.svg?label=Version\n[hfuc]: https://github.com/halostatue/fish-utils-core\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalostatue%2Ffish-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalostatue%2Ffish-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalostatue%2Ffish-utils/lists"}