{"id":21806820,"url":"https://github.com/roguh/tryalias","last_synced_at":"2026-05-03T22:32:25.161Z","repository":{"id":89928134,"uuid":"122088647","full_name":"roguh/tryalias","owner":"roguh","description":"Aliases with fallbacks. `tryalias openpdf \"zathura --fork\" evince mupdf-x11 mupdf openoffice gimp reader10.exe`","archived":false,"fork":false,"pushed_at":"2021-09-08T05:27:59.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T04:42:01.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roguh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2018-02-19T16:21:01.000Z","updated_at":"2021-09-08T05:28:01.000Z","dependencies_parsed_at":"2023-05-30T13:45:15.220Z","dependency_job_id":null,"html_url":"https://github.com/roguh/tryalias","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Ftryalias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Ftryalias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Ftryalias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Ftryalias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roguh","download_url":"https://codeload.github.com/roguh/tryalias/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759961,"owners_count":20505716,"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","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":[],"created_at":"2024-11-27T12:30:11.973Z","updated_at":"2025-10-06T15:36:04.985Z","avatar_url":"https://github.com/roguh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tryalias\n\n`tryalias openpdf \"zathura --fork\" evince mupdf-x11 mupdf openoffice gimp reader10.exe`\n\nAliases with fallbacks.\n\nThe `tryalias` command works like `alias`, but it sequentially checks\neach of its multiple arguments until it finds a valid command.\nIf no argument is found, alias the first argument to the last argument.\n\n## Installation\n\n### fish\n\nPlace your tryalias commands in `~/.aliases`.\nCopy `tryalias.fish` to `~/.config/fish/functions/` and source `~/.aliases`\nin your `config.fish`. See `config.fish-sample`.\n\n### bash or zsh\n\nPlace your tryalias commands in `~/.aliases`.\n\n```\n$ cp .tryalias ~\n$ cat bashrc-sample \u003e\u003e ~/.bashrc\n```\n\n### csh\n\nPlace your tryalias commands in `~/.aliases`.\n\nIn csh, `tryalias` is an alias for `alias`.\nSee `cshrc-sample`.\n\n## Usage\n\n```\ntryalias please sudo\n\n# Use previously defined aliases\ntryalias exa \"exa --git\"\ntryalias l \"exa -Fa\" \"ls -Fa\"\ntryalias ll \"l -lh\"\n\n# Confirm overwrites and deletions\ntryalias mv \"mv -i\"\ntryalias cp \"cp -i\"\ntryalias rm \"rm -i\"\n\n# PDF reader\ntryalias e \"zathura --fork\" evince mupdf-x11 mupdf \n\n# Favorite editor?\ntryalias v vis nvim vim vi elvis ex-vi nano ed gedit libreoffice openoffice \"playonlinux --run 'Microsoft Powerpoint 2010'\"\n\n# Start emacs with CLI \ntryalias em \"emacs -nw\"\n\n# Start emacs client. Start daemon if its not running.\ntryalias emc \"emacsclient -nw --alternate-editor=\"\"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froguh%2Ftryalias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froguh%2Ftryalias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froguh%2Ftryalias/lists"}