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 2d1331e104
commit 0ddd0ed4fb

View file

@ -1,8 +1,8 @@
controllers = angular.module("controllers", []);
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) {
$location.path(view);
$scope.currentTab = view;