eivindarvesen / prm Goto Github PK
View Code? Open in Web Editor NEWA minimal project manager for the terminal.
License: BSD 3-Clause "New" or "Revised" License
A minimal project manager for the terminal.
License: BSD 3-Clause "New" or "Revised" License
It would be a nice feature to have smart completion. It is in fact the only thing that prevents me from using prm everywhere.
Unfortunately, I do not have the skills (nor time to improve them right now) to write such a feature, so I am only suggesting.
running prm list when there are no projects in ~/.prm will return an error: /home//stuff/scripts/prm.sh:187: no matches found: ./*
prm should return status codes, e.g. return 1
upon failure.
It is very important to use return
, as opposed to exit
, since the latter will kill the shell (since prm is sourced).
Some relevant lines can be seen in adbf77c.
I think the project readme is already getting too long and/or verbose.
It would maybe be best if the readme contained only the minimum needed information (subjects), such as the demo-gif, how to set up prm and get started, etc., so as to not overwhelm new users.
Other information, such as notes on contributions, could go into the wiki.
I would appreciate input about what should go where, be rewritten (and how), and so on.
Cool tool! I've enjoyed it so far.
From an interface perspective, I'd like to see some output when I type the bare command. Right now it's just illegal option --
. Perhaps either print usage or a listing of active/all projects? Not sure what would be best, but it would be nice to save a few keystrokes and cue in on what to do next.
prm should be distributed through various package managers (e.g. apt, brew, macports, pacman, yum...), though it should perhaps be postponed until there is a stable release.
Needs to include an append (alias) to a user dotfile or at least a message regarding proper use of prm (i.e. sourcing the script), e.g. via a post-install hook.
Support creation of common modules/tasks that can be used across projects.
Could be solved by implementing a loader-function in prm (which would be automatically available in projects) that loads "$ARGUMENT.sh" from a reserved folder~~, and appropriate commandline args for manipulating these modules~~.
When using prm with cygwin on Windows, native editors can't handle the unix path.
Example:
$ bash -x ~/bin/prm/prm.sh add test1
+ sublime_text.exe /home/myusername/.prm/test1/start.sh
+ sublime_text.exe /home/myusername.prm/test1/stop.sh
Some way to customize the path is therefor wanted, and should provide the possibility to execute the following line:
sublimetext `cygpath.exe -d "/home/myusername/.prm/test1/start.sh"`
The line in question:
https://github.com/eivind88/prm/blob/master/prm.sh#L164
It would be nice to put a file in a directory so that I could do prm start
without arguments anywhere under that directory and the appropriate project would start. This file could also indicate the base directory for relative paths in start.sh and stop.sh.
I use pipenv
for python environment management and the following start script:
cd path/to/project
pipenv shell
git status
Stop script
exit
pipenv shell
, which spawns a shell and places the terminal "inside that shell".git status
doesn't run until I leave the shell using exit
prm stop
as intendedHere I use:
prm start
- note cd
executes and we are placed inside pipenv shell. Can be seen from (AIMAS) on left hand sideprm stop
- prm says no active project
because prm start
hasn't finished executingexit
- I use exit to leave the shell the git status
executesCurrently the only possible project path is $HOME/.prm/
which means that if I want to use prm for my projects I must
The latter isn't a solution since if I have for example several directories with projects (for example work and personal)
It won't work.
I suggest to make the path based on an enviroment variable and fallback to the default path only if it isn't set.
That should solve the described problem above. If this makes scence to you and you agree please say so. I will make a
pull request with the edit.
This repo should have GitHub Pages when 1.0.0 is released.
The pages should be end user-centered – unlike the Readme and Wiki, which can contain details.
Migrate infrastructure on Travis.
There are some useful things to be found commented out in .travis.yml
.
Needs to be tested, ensuring that testing actually is faster on the new infrastructure; i.e. make sure that the substituted before_install
steps aren't actually slower.
Install BATS from source, or wait until its APT source is whitelisted by Travis CI.
This relates to PR #27, which introduced a check with "uname" to use the "cygpath" executable when opening the scripts. This works fine when using an editor external to Cygwin (ex: Sublime Text), but editors installed in Cygwin (ex: vim) will most likely not be able to open a file with a native Windows path.
I've made PR #35 to make the usage of "cygpath" optional.
The active option won't list any active project instances at present.
Hey,
first of all, I really like prm as project manager. Unfortunately I ran into the following problem:
The test if prm.sh is executed or sourced, i.e.
# Test if prm is run in subshell or sourced
if [ "$(basename "${0//-/}")" = "prm.sh" ]; then
return_error 1 "$(printf "$SOURCE")"
exit
fi
evaluates in zsh to true, even if the script is sourced. I know far too less zsh things to tell you why, but my very basic investigation (I echoed
I try to find a proper solution on my own, but any help is appreciated since I am very unfamiliar with bash/zsh!
All the best,
Christoph
branch: master
commit: 97e7598
The Wiki should be updated, in both structure and content.
Related to issue #19.
It would be great to have some sort of testing, so that contributors don't have to manually perform every action/combination that could be affected by their changes, or worse yet, don't test at all.
It would probably be best to set up integration with Travis CI, or something, but I have no idea what options exist for testing with bash
and zsh
– except for shUnit2, which I recently stumbled upon.
I added the alias as instructed, when running prm
, I get the following error:
'case' builtin not inside of switch block
~/dev/notmine/prm/prm.sh (line 15): case "$1" in
^
from sourcing file ~/dev/notmine/prm/prm.sh
called on line 151 of file /usr/local/Cellar/fish/2.2.0/share/fish/config.fish
in function '.'
called on line 1 of file -
in function 'prm'
called on standard input
source: Error while reading file '/Users/dan/dev/notmine/prm/prm.sh'
I am sure that is probably not supported but any chance you can point me to why project stop is failing to drop back to a normal shell
ryan@galileo ~/illustris- ❯❯❯ prm stop illustris master On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Already up-to-date.
Stopping project illustris
rm: remove regular file ‘/home/ryan/.prm/.active.d’? y
rm: remove regular file ‘/home/ryan/.prm/.path.d’? y
/home/ryan/prm/prm.sh:export:144: not valid in this context: "}%F{4}${_prompt_sorin_pwd}%(!.
zsh: parse error
${SSH_TTY:+"ryan@galileo ⏎ _zsh_highlight_widget_reset-prompt: parse error
${SSH_TTY:+"ryan@galileo ⏎ _zsh_highlight_widget_reset-prompt: parse error
${SSH_TTY:+"ryan@galileo
Add a copy function that copies a project (and opens associated start- and stop-scripts in $EDITOR?
)
Might look like this:
prm copy <old> <new>
As proposed by @FredDeschenes in issue #14.
It would be nice to be able to pass additional parameters to the start script.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.