Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(280)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 3997041: Bash auto-completion for trytond

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 12 months ago by bch
Modified:
14 years, 11 months ago
Reviewers:
yangoon, ced
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Try to find modules via python script #

Total comments: 8

Patch Set 3 : Fix typo #

Patch Set 4 : Added completion for client #

Patch Set 5 : Better variable naming #

Created: 14 years, 11 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -0 lines) Patch
A tryton_completion View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A trytond_completion View 1 2 1 chunk +71 lines, -0 lines 0 comments Download
Total messages: 13
|
ced
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion File etc/trytond_completion (right): http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1 etc/trytond_completion:1: Missing shebang
14 years, 12 months ago (2011年01月13日 22:49:43 UTC) #1
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion
File etc/trytond_completion (right):
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1
etc/trytond_completion:1: 
Missing shebang
Sign in to reply to this message.
bch
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion File etc/trytond_completion (right): http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1 etc/trytond_completion:1: On 2011年01月13日 22:49:43, ced wrote: > Missing shebang I ...
14 years, 12 months ago (2011年01月13日 23:03:46 UTC) #2
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion
File etc/trytond_completion (right):
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1
etc/trytond_completion:1: 
On 2011年01月13日 22:49:43, ced wrote:
> Missing shebang
I checked and no other script in /etc/bash_completion.d/ comes with a shebang.
And it's logical because the file is sourced and never called directly.
Sign in to reply to this message.
yangoon
Nice. Where should it go in the trytond package? http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion File etc/trytond_completion (right): http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1 etc/trytond_completion:1: ...
14 years, 12 months ago (2011年01月14日 12:40:12 UTC) #3
Nice. Where should it go in the trytond package?
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion
File etc/trytond_completion (right):
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode1
etc/trytond_completion:1: 
On 2011年01月13日 23:03:46, bch wrote:
> On 2011年01月13日 22:49:43, ced wrote:
> > Missing shebang
> 
> I checked and no other script in /etc/bash_completion.d/ comes with a shebang.
> And it's logical because the file is sourced and never called directly.
Some have, some not, so it seems to be deliberate.
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode18
etc/trytond_completion:18: --update)
i.e. -u|--update for the short versions
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode19
etc/trytond_completion:19: module_path="$(dirname $(which
${pgm}))"/../trytond/modules/
JFTR: path will have to be patched for debian, don't know for others
distribution
http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode20
etc/trytond_completion:20: modules=$(find ${module_path} -maxdepth 1 -type d
-printf "%f\n") #FIXME
FIXME for modules/ itself contained in the listing?
Sign in to reply to this message.
yangoon
On 2011年01月14日 12:40:12, yangoon wrote: > Nice. Where should it go in the trytond package? ...
14 years, 12 months ago (2011年01月14日 13:05:05 UTC) #4
On 2011年01月14日 12:40:12, yangoon wrote:
> Nice. Where should it go in the trytond package?
Sorry didn't read your questions on tryton-dev.
> http://codereview.appspot.com/3997041/diff/1/etc/trytond_completion#newcode19
> etc/trytond_completion:19: module_path="$(dirname $(which
> ${pgm}))"/../trytond/modules/
> JFTR: path will have to be patched for debian, don't know for others
> distribution
dito
Sign in to reply to this message.
bch
14 years, 11 months ago (2011年01月19日 00:19:25 UTC) #5
Sign in to reply to this message.
ced
http://codereview.appspot.com/3997041/diff/6001/trytond_completion File trytond_completion (right): http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14 trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null) python2 doesn't exist on every OS ...
14 years, 11 months ago (2011年01月19日 08:38:44 UTC) #6
http://codereview.appspot.com/3997041/diff/6001/trytond_completion
File trytond_completion (right):
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14
trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null)
python2 doesn't exist on every OS
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode45
trytond_completion:45: opts="--version -h --help -c --config --debug -v
--verbose -d --database -u --update --pidfile --logfile -i --init"
Perhaps you can find it with the output of `trytond --help`
Sign in to reply to this message.
bch
http://codereview.appspot.com/3997041/diff/6001/trytond_completion File trytond_completion (right): http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14 trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null) On 2011年01月19日 08:38:44, ced wrote: > ...
14 years, 11 months ago (2011年01月19日 09:08:25 UTC) #7
http://codereview.appspot.com/3997041/diff/6001/trytond_completion
File trytond_completion (right):
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14
trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null)
On 2011年01月19日 08:38:44, ced wrote:
> python2 doesn't exist on every OS
This is why the code first try to find it and if it does not exist user python
(lines 15-18).
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode45
trytond_completion:45: opts="--version -h --help -c --config --debug -v
--verbose -d --database -u --update --pidfile --logfile -i --init"
On 2011年01月19日 08:38:44, ced wrote:
> Perhaps you can find it with the output of `trytond --help`
IMO it's better to hardcode them: the options does not change every day and it
will had a lot of code with potential bugs.
Sign in to reply to this message.
yangoon
http://codereview.appspot.com/3997041/diff/6001/trytond_completion File trytond_completion (right): http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14 trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null) On 2011年01月19日 09:08:26, bch wrote: > ...
14 years, 11 months ago (2011年01月19日 10:46:52 UTC) #8
http://codereview.appspot.com/3997041/diff/6001/trytond_completion
File trytond_completion (right):
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14
trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null)
On 2011年01月19日 09:08:26, bch wrote:
> On 2011年01月19日 08:38:44, ced wrote:
> > python2 doesn't exist on every OS
> 
> This is why the code first try to find it and if it does not exist user python
> (lines 15-18).
Even python must not exist on every system. It is not required for a base
install of debian.
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode17
trytond_completion:17: PYTHON_EXEC=$(which python2 2>/dev/null)
do you mean here:
PYTHON_EXEC=$(which python 2>/dev/null)
?
Sign in to reply to this message.
bch
http://codereview.appspot.com/3997041/diff/6001/trytond_completion File trytond_completion (right): http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14 trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null) > Even python must not exist ...
14 years, 11 months ago (2011年01月19日 11:07:40 UTC) #9
http://codereview.appspot.com/3997041/diff/6001/trytond_completion
File trytond_completion (right):
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode14
trytond_completion:14: PYTHON_EXEC=$(which python2 2>/dev/null)
> Even python must not exist on every system. It is not required for a base
> install of debian.
In this case this script will not be installed.
http://codereview.appspot.com/3997041/diff/6001/trytond_completion#newcode17
trytond_completion:17: PYTHON_EXEC=$(which python2 2>/dev/null)
On 2011年01月19日 10:46:52, yangoon wrote:
> do you mean here:
> PYTHON_EXEC=$(which python 2>/dev/null)
> ?
Oups, bad copy-paste.
Sign in to reply to this message.
bch
14 years, 11 months ago (2011年01月19日 11:41:12 UTC) #10
Sign in to reply to this message.
bch
14 years, 11 months ago (2011年01月25日 10:23:32 UTC) #11
Sign in to reply to this message.
bch
14 years, 11 months ago (2011年01月25日 10:27:11 UTC) #12
Sign in to reply to this message.
bch
The completion for client provides completion on log channels (currently "common view rpc.request rpc.result common.options ...
14 years, 11 months ago (2011年01月25日 10:27:57 UTC) #13
The completion for client provides completion on log channels (currently "common
view rpc.request rpc.result common.options all"), but I don't know if it's
correct.
Sign in to reply to this message.
|
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /