{"id":27307219,"url":"https://github.com/pseyfert/lb-zsh","last_synced_at":"2025-04-12T04:04:13.414Z","repository":{"id":72263463,"uuid":"55867799","full_name":"pseyfert/lb-zsh","owner":"pseyfert","description":"zsh goodies for LHCb","archived":false,"fork":false,"pushed_at":"2019-04-04T11:35:31.000Z","size":77,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T04:03:41.645Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseyfert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2016-04-09T21:29:59.000Z","updated_at":"2022-02-22T17:10:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"65f7a4e5-dd1b-4395-b282-30be90ef4f27","html_url":"https://github.com/pseyfert/lb-zsh","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/pseyfert%2Flb-zsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Flb-zsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Flb-zsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Flb-zsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseyfert","download_url":"https://codeload.github.com/pseyfert/lb-zsh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514229,"owners_count":21116903,"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":"2025-04-12T04:03:23.755Z","updated_at":"2025-04-12T04:04:13.406Z","avatar_url":"https://github.com/pseyfert.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](logo.png)\n\n# lb-zsh\nzsh goodies for LHCb\n\n## target audience\nA collection of zsh completion functions to make everyday life of zsh users in\n[LHCb](http://lhcb-public.web.cern.ch/lhcb-public/) easier.\n\nThe focus is analysts who use 5% of the options 95% of the time. Experts who\nneed all options of all tools may want to do a bit more.\n\n## what's shipped and what's not\nThe package should not contain general zsh features which are useful outside of\nLHCb as well. Instead it is planned to contain only features which are useful\nto LHCb users only.\n\nA border line case is the completion for `root`.\n\n## demo\nSee my [blog\npost](http://virgilio.mib.infn.it/~seyfert/lb-zsh-developments-and-screencasts.html)\nfor a screencast.\n\n# helpful pointers\n\nWhen developing the completions,\n[this howto](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org)\nwas of great help.\n\nstackoverflow/stackexchange posts which helped:\n * http://stackoverflow.com/questions/4824590/propagate-all-arguments-in-a-bash-shell-script\n * http://stackoverflow.com/questions/59838/check-if-a-directory-exists-in-a-shell-script\n * http://stackoverflow.com/questions/2953646/how-to-declare-and-use-boolean-variables-in-shell-script\n * http://stackoverflow.com/questions/8742783/returning-value-from-called-function-in-shell-script\n * http://unix.stackexchange.com/questions/67898/using-the-not-equal-operator-for-string-comparison\n\n# feature list\n\n## git-lb-use\n`git lb-use` completes\n * its command line options (e.g. connection protocol)\n * projects from a list of hard coded projects\n * suggests url stubs (cern gitlab, with its ports)\n\n## git-lb-checkout\nthe git-lb-checkout command gets completed as:\n`git lb-checkout [remote/branch-or-tag] [package-in-remote-project]`\nThe first block only querries accessible branches and tags from\nremotes/projects which were added with `lb-use` before. Packages get completed\nfrom the official list of existing packages, filtered according to the project\nin the previous argument (when starting with `git lb-checkout\nStripping/master`, only packages associated to the Stripping project get added.\nIt is not checked if they exist in the chosen branch or tag).\n\n## getpack\nThe same function which returns a (shortened) list of packages for\ngit-lb-checkout just provides all packages.\n\n## lb-run\n\n`lb-run` completes projects (from a hard coded list), and suggests version\nnumbers (checking the list of existing versions, starting to suggest from the\nmost recent one). Afterwards, any (currenty) executable command gets completed,\nand a few common commands get suggested. After that, the completion for the\nchosen command is called.\nTODO: add nightly support\n\n## lb-dev\njust does the first part of `lb-run`, i.e. no completion after the version number.\nTODO: add nightly support\n\n## lblogin\n`LbLogin` knows about the `-c` option and has a hard coded list of common\n`CMTCONFIG` variables. For `afsLbLogin` and `cvmfsLbLogin` that's about it.\nFor `LbLogin.sh`, also the `_gnu_generic` function is called to parse the help\nmessage and show all documented options.\n\n## GUESS\nIf you're (deep) inside a CMT project path, the `GUESS` alias will be `PROJECT\nVERSION`, which you can use with `SetupProject` or `Lbglimpse`.\n\n## run\nSimilarly, the `run` function searches for the `run` executable in an `lb-dev`\nproject.  Not to go too wild, I placed barriers not to go beyond `$HOME` or\n`/`.  `run` can handle if it doesn't find `run` (will return an error instead\nof wildly running commands). Furhtermore, the `run` function forwards the exit\ncode of the `run` executable.\n\n## bsub\ncomplete `-q` and queue names, `-R` for CentOS7 submission, hint that `-J` is\nthe job name.\n\n## bkill\nsuggest lxbatch job ids\n\n## bjobs\nmodified default listing\n\n## bkillall\nfunction to kill all lxbatch jobs (asks for confirmation)\n\n## gaudirun.py\ncomplete .py and .opts files and suggest options from --help\n\n## ganga\ncomplete .py files and suggest options from --help\n\n## SetupDaVinci (and others)\n\nSimilar to `lb-run`, version numbers (from `SetupDaVinci --list-versions`) are\nsuggested.\n\n## dirac-dms-lfn-accessURL\n\nThe two (for me) interesting grid storage elements are completed, such that I\ndon't have to call `dirac-dms-lfn-replicas` just to look up how the CERN EOS\nMC storage element is called.\n\n## general TODO\nNone of the commands checks against the current `CMTCONFIG`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseyfert%2Flb-zsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseyfert%2Flb-zsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseyfert%2Flb-zsh/lists"}