cli: fix current project detection.
This commit is contained in:
parent
19e6e14f01
commit
58ad2950f8
1 changed files with 3 additions and 3 deletions
|
@ -121,7 +121,7 @@ module Kook
|
||||||
desc "rm PROJECT VIEW", "Unregister existing view on project"
|
desc "rm PROJECT VIEW", "Unregister existing view on project"
|
||||||
def rm view_name
|
def rm view_name
|
||||||
before_filter options
|
before_filter options
|
||||||
project_name = options[:project] || @app.current_project
|
project_name = @app.current_project
|
||||||
|
|
||||||
@app.remove_view project_name, view_name, view_path
|
@app.remove_view project_name, view_name, view_path
|
||||||
end
|
end
|
||||||
|
@ -135,7 +135,7 @@ module Kook
|
||||||
desc "add PROJECT VIEW COMMAND", "Add command for view "
|
desc "add PROJECT VIEW COMMAND", "Add command for view "
|
||||||
def add view_name, command
|
def add view_name, command
|
||||||
before_filter options
|
before_filter options
|
||||||
project_name = options[:project] || @app.current_project
|
project_name = @app.current_project
|
||||||
|
|
||||||
@app.add_command project_name, view_name, command
|
@app.add_command project_name, view_name, command
|
||||||
end
|
end
|
||||||
|
@ -143,7 +143,7 @@ module Kook
|
||||||
desc "rm VIEW INDEX", "Remove command for view"
|
desc "rm VIEW INDEX", "Remove command for view"
|
||||||
def rm view_name, command_index
|
def rm view_name, command_index
|
||||||
before_filter options
|
before_filter options
|
||||||
project_name = options[:project] || @app.current_project
|
project_name = @app.current_project
|
||||||
|
|
||||||
@app.remove_command project_name, view_name, command_index.to_i
|
@app.remove_command project_name, view_name, command_index.to_i
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue