fish_config to select the proper tab when run with a tab name

`fish_config abbr` should show "abbreviations" selected
in the tab list.
This commit is contained in:
ridiculousfish 2015-06-14 00:04:29 -07:00
parent 7b34aaa432
commit 6fbb3c9976

View file

@ -1,8 +1,8 @@
controllers = angular.module("controllers", []); controllers = angular.module("controllers", []);
controllers.controller("main", function($scope, $location) { controllers.controller("main", function($scope, $location) {
$scope.currentTab = "colors"; // substr(1) strips a leading slash
$scope.currentTab = $location.path().substr(1) || "colors";
$scope.changeView = function(view) { $scope.changeView = function(view) {
$location.path(view); $location.path(view);
$scope.currentTab = view; $scope.currentTab = view;